- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
- « Previous
-
- 1
- 2
- Next »
Re: Error after using bSave in a VBScript
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-21-2011 08:06 AM
Very weird. It goes through the Insert into tsoSOLine for all products, then it fails on the insert into tsoSOLineDist. Can't figure out why, there's nothing actually written to the table yet because it's not saving line by line. Checked the keys, it's using unique keys. It doesn't already exist in the table, I don't understand why it's throwing that error.
Hollie
Hollie
Re: Error after using bSave in a VBScript
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
01-27-2012 09:23 AM
I see that this thread is a few months old, and I don't know if it still an issue. Our experience has been that the sales order screen saves its data to the database as soon as a line item is added. Perhaps, instead of looping through the grid UI to check for certain line items, you could use the Session.AppDatabase object to query the tsoSalesOrder and tsoSOLine (and perhaps other) tables to verify the existence of the lines you want.
You'll need to determine the SOKey of the current sales order, which you should be able to get from the sales order number control, reference number control, and company ID (Session.CompanyID). Query the tsoSalesOrder table with that data to get the SOKey. Once you have the SOKey, you can query the tsoSOLine table for either the ItemKey or Description values you need.
Technology Consultant
SGS Technology Group
http://www.sgstech.com
Re: Error after using bSave in a VBScript
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
01-27-2012 09:49 AM
Just an FYI -- Sales Order only saves lines at the line level if you have the SO Option Commit Inventory at SO Line Entry checked.
Principal Software Engineer
Sage 500 ERP
Re: Error after using bSave in a VBScript
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-15-2012 10:16 AM
Jenny is correct, and because we can't validate the items until all the lines are entered, we have that turned off. If we have it turned on, the script on the Save event of the sales order runs after every line is entered. We only want the script to run when the actual Save button is clicked. I was thinking about creating my own "Save" button, so I can control when the script runs.
Hollie
- « Previous
-
- 1
- 2
- Next »


