- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Script causes sales order to freeze
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-03-2012 02:45 PM
I have written a script that takes in a string code and once an "APPLY" button the script looks up the stored code in a user defined table and using the data in the user defined table, imports a value in either the discount amount field or the discount rate field.
My problem is that the sales order becomes unstable once the script is ran. If you go back into the lines tab and make a change the sales order hangs and has to be force shut down. Really the only thing the script does in write to the header of the order either the discount amount or rate (depends ont he code used).
The script seems to work fine and populates the field correctly. What is strange is that even if you get out of the order completly (accept it) and later go back into the order to make a line adjustment or add a new line, once you access the totals tab...HANG, FREEZE.
It is very frustrating. Any assistance would be appriciated.
Thanks
Re: Script causes sales order to freeze
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-03-2012 02:57 PM
Hi mandm,
What version are you running? Is this the only script running? Is it possible you could have another script that is conflicting with this one? Is this a custom button script, or something tied into one of the UDS events like post-validate of a column?
Are you using Line Discounts as well?
The DiscountRate and DiscountAmt fields in Sales order do calculate each other. (ie setting the rate, calculates the amount and vice versa). But, I don't think that would be causing your issue.
Thanks
Elliott
Re: Script causes sales order to freeze
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-03-2012 04:52 PM
Not using messagebox by any chance?
There are some issues with messagebox in 4.4 earlier PU's where the system becomes unstable and causes hangs after repeated calls to messagebox. Have been told that the later PU's fix this.
Target System Technology, Inc. - Spokane, WA -
The best solution often comes not from answering the question asked, but understanding WHY the question was asked.
Re: Script causes sales order to freeze
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-06-2012 09:06 AM
The version is 4.40.6, and yes this is the only script running. It is a custom cutton script that is only run when the button is pushed, which is why it is confusing.
I am not using the discount in the lines at all. As for the Discount rate and amount in the header, the script only uses one or the other depending on which option is selected.
"Not using messagebox by any chance?"
Yes I am using one call to messagebox. What PU resolved the issue?
Thanks for your input
Re: Script causes sales order to freeze
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-06-2012 09:10 AM
I was told that only 4.5 would fix the messagebox issue.
Re: Script causes sales order to freeze
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-06-2012 09:20 AM
Is there any other way to display a text variable to the screen in 4.4 MAS 200 that is stable?
Re: Script causes sales order to freeze
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-06-2012 11:12 AM
Not that I have found. To my knowledge the PU is the only solution, but if anyone has come up with something better, that would be good to know.
Target System Technology, Inc. - Spokane, WA -
The best solution often comes not from answering the question asked, but understanding WHY the question was asked.
Re: Script causes sales order to freeze
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-06-2012 11:16 AM
Tom - which PU? I was told that they couldn't correct 4.4 because it would involve a change to the Providex version.
Re: Script causes sales order to freeze
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-06-2012 11:27 AM
Yes, the solution is available in 4.50, and not on a 4.40 PU.
mandm, what is it you are putting on the messagebox, just a message with an OK button? or are there decision buttons?
Re: Script causes sales order to freeze
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-06-2012 01:28 PM
Throughout the script I am storing data in a text variable and then passing that variable to the screen for informational purposes.
Example: What coupon type was applied, and if not applied, why. It also helps them to know when the script is finished as it cycles through the sales order history table and takes about 20 seconds.


