Script Event Triggers

SUGGESTED

Hi,

I have a set of scripts on SO Detail designed to retain pricing entered by the user. (Without these scripts, MAS reverts the price back to the defaults once the item options are entered.) The scripts work very well 99% of the time. But every once in a while, when one specific salesperson revisits a pre-existing sales order, they do not act as expected. In particular, if a line is added or modified on the Detail table, the scripts recalculate pricing for all the lines--usually setting all the prices to the same value. This happens even when the line added is at the end of all the other lines.

Is there something I don't understand about what triggers scripts? I would have expected only the modified lines to be subject to the script. Also, when the problem happens, not all columns seem to trigger scripts. E.g., the post-validate Item Code script does not trigger, whereas the post-validate BillOption9 one does. This is weird, since the Item Code field is always populated.

I am not 100% sure it is the scripts causing the problem, but I strongly suspect this is the case.

Thanks for any help or clarification.

Meg

  • 0 in reply to mtilton

    Hi everyone,

    There is a new and strange development with this issue.

    I archived the scripts and deleted them from Customizer, because the salespeople were understandably vexed when this problem was happening. I figured I'd return to the scripts in a few months when I had a chance to put in further checks and do more testing.

    Well, one of the salespeople had the same issue happen to him today! He was working on an existing quote, adding and deleting lines. He generated a PDF of the quote, noticed the expiration date and a price needed fixing, and went back to SO Entry. He changed the price of one of the bottom-row line items to $11,000. MAS then changed *all* the prices except the first row's to $11,000.

    I am mystified. All three scripts were deleted. So maybe it wasn't the scripts that were causing this issue (which would explain why no one could find a problem with their logic).  However, I haven't seen anything else on the forums suggesting others are experiencing this issue, and it would obviously be a big bug. Also, the problem seemed to start around the time I implemented the scripts. Is there any way they could still be firing, even if they've been deleted?

    We do have other scripts still in operation, but none of them change pricing.

    I'm at a loss as to how to fix the problem. The salespeople are frustrated, and I'd like to help. Any suggestions or ideas would be welcome.

    Meg

  • 0 in reply to mtilton
    SUGGESTED

    Greetings,

    Check the master script in the ..\MAS90\CM\Script folder for the object.  Is it possible that even though you deleted the original scripts, the master script still includes this logic?  If so, then they could still be active.  If the logic is there, then they didn't delete properly.  If the logic isn't there then there is another issue and you should contact Sage Customer Support for assistance.

    Thank you,

    Kent

  • 0 in reply to Kent Mackall

    Kent,

    Thanks! I think that may have been the issue. I had thought that as long as you deleted the scripts via user-defined script maintenance, they wouldn't execute. But it sounds like that's not the case. They were all still in the CM/Scripts folder, so I moved them. Time will tell if this is the solution, but it sounds like it may work. I appreciate the help.

    Meg

  • 0 in reply to mtilton

    Greetings,

    Thanks for posting back.

    If you delete the scritps in User Defined Script Maintenance and didn't hit the compile button in the lower left corner to recompile (update) Customizer, then the logic would not be deleted from the master script.

    Thanks,

    Kent