Sage 100

 View Only
  • 1.  I have a simple script that @LeeGraham wrote for m

    Posted 05-25-2017 04:06
    I have a simple script that @LeeGraham wrote for me 4-5 years ago that compares the first three characters of the ship to zip on an order/invoice against a UDT to get the correct salesperson. It's worked flawlessly all this time. We upgraded the client to v2016 and the script no longer runs. No error, just doesn't run. I've confirmed it's set to the pre-write event in both SO Order and Invoice tables. Compiles fine, syntax checks OK. Ideas?


  • 2.  RE: I have a simple script that @LeeGraham wrote for m

    Posted 05-25-2017 04:14
    Check your Company Maintenance Preferences. Is the ""Allow External Access"" box checked?


  • 3.  RE: I have a simple script that @LeeGraham wrote for m

    Posted 05-25-2017 04:25
    What about the allow external access in that company in company maintenance? Sent from my cell phone. Please forgive any misspellings.


  • 4.  RE: I have a simple script that @LeeGraham wrote for m

    Posted 05-25-2017 06:03
    If its not the allow external access, I would check that the fields are still labeled the same between the versions I had some issues with ""$"" between versions. I also had a case that a script worked in an older version though actually contained an error, while a new version compiled the script didn't function properly in my case it was because of infinite loops.


  • 5.  RE: I have a simple script that @LeeGraham wrote for m

    Posted 05-25-2017 06:24
    Role permissions to the UDT?


  • 6.  RE: I have a simple script that @LeeGraham wrote for m

    Posted 05-25-2017 07:03
    I checked Allow External Access - and it was enabled. I'll check role permissions next but it allows me to edit the values in the UDT so I don't think that's an issue. I'll check field references as there are $. Since I didn't write the script I'm not sure when, or if they should be used.


  • 7.  RE: I have a simple script that @LeeGraham wrote for m

    Posted 05-25-2017 07:31
    There is also a weird thing where users have to have access to all the UDTs that are created, not just the one the script is working with. I'm sure there is some logic like maybe they have to have access to the first table in UDT maintenance but I haven't spent the time to actually troubleshoot it. Try giving access to all the UDTs.


  • 8.  RE: I have a simple script that @LeeGraham wrote for m

    Posted 05-25-2017 08:23
    If you suspect a UDT access issue, put a pop-up into the script when the UDT is first accessed. `oSequenceTable = oSession.GetObject(""CM_UDTMaint_bus"", ""SO_UDT_SEQUENCE"") if oSequenceTable <> 0 then Set oSequenceTable = oSession.AsObject(oSequenceTable) else retVal = oSession.AsObject(oSession.UI).MessageBox("""", ""Access to SO_UDT_SEQUENCE is required for the ??? script to work."") exit sub end if`


  • 9.  RE: I have a simple script that @LeeGraham wrote for m

    Posted 05-25-2017 08:35
    Kathryn, the field names are to be written in the same way as they show in data file display and maintenance, in the off chance that's the issue. I believe the $ is either if the field is a number or a string but I haven't quite figured out the logic.


  • 10.  RE: I have a simple script that @LeeGraham wrote for m

    Posted 05-25-2017 09:44
    Fields are referenced same as shown in DFDM, permissions OK, only one UDT. I'm going to try deleting the script reference and setting it back up again and I will add the Message Box to confirm that it's actually seeing the UDT. Thanks all!