Sage MAS 90 and 200 Sage MAS 500 blogs Product Feedback Support Training
Reply
Contributor
mandm
Posts: 16
Registered: 03-17-2011
0

Script causes sales order to freeze

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

Sage Employee
jepritch
Posts: 233
Registered: 08-25-2009
0

Re: Script causes sales order to freeze

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

 

 

 

 

Sage MAS Partner
TomTarget
Posts: 1,752
Registered: 11-02-2008
0

Re: Script causes sales order to freeze

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.

Thomas H. Rogers, C.P.A.
Target System Technology, Inc. - Spokane, WA -
The best solution often comes not from answering the question asked, but understanding WHY the question was asked.
Contributor
mandm
Posts: 16
Registered: 03-17-2011
0

Re: Script causes sales order to freeze

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

Regular Contributor
Gator
Posts: 269
Registered: 12-05-2008
0

Re: Script causes sales order to freeze

I was told that only 4.5 would fix the messagebox issue.

Contributor
mandm
Posts: 16
Registered: 03-17-2011
0

Re: Script causes sales order to freeze

Is there any other way to display a text variable to the screen in 4.4 MAS 200 that is stable?

Sage MAS Partner
TomTarget
Posts: 1,752
Registered: 11-02-2008
0

Re: Script causes sales order to freeze

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.

Thomas H. Rogers, C.P.A.
Target System Technology, Inc. - Spokane, WA -
The best solution often comes not from answering the question asked, but understanding WHY the question was asked.
Regular Contributor
Gator
Posts: 269
Registered: 12-05-2008
0

Re: Script causes sales order to freeze

Tom - which PU?  I was told that they couldn't correct 4.4 because it would involve a change to the Providex version.

Sage Employee
jepritch
Posts: 233
Registered: 08-25-2009
0

Re: Script causes sales order to freeze

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?

Contributor
mandm
Posts: 16
Registered: 03-17-2011
0

Re: Script causes sales order to freeze

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.