Sage 100

 View Only
Expand all | Collapse all

Have a client with numerous SO Entry scripts. The

Wayne Schulz

Wayne Schulz08-29-2018 08:21

Beth Bowers

Beth Bowers08-30-2018 02:58

  • 1.  Have a client with numerous SO Entry scripts. The

    Posted 08-29-2018 05:39
    Have a client with numerous SO Entry scripts. They want to stop using one of them. I pulled up the User-Defined scripts and deleted that script. I also renamed it and moved it to a new folder on the server. I recompiled the scripts in use, after scrolling through all of them and making sure this one no longer showed up. It's still running. WTH?


  • 2.  RE: Have a client with numerous SO Entry scripts. The

    Posted 08-29-2018 06:13
    Did you look in the compiled script and see if it is still showing there? Maybe rename the compiled script and recompile and see if it's still there.


  • 3.  RE: Have a client with numerous SO Entry scripts. The

    Posted 08-29-2018 07:30
    Is it possible that script is called from more than one event?


  • 4.  RE: Have a client with numerous SO Entry scripts. The

    Posted 08-29-2018 07:40
    I checked the compiled script and it's not there, which has caused me to freak out even more. I have not renamed and recompiled yet, since there are a billion people on the system now. I'll try that early tomorrow.


  • 5.  RE: Have a client with numerous SO Entry scripts. The

    Posted 08-29-2018 08:21
      |   view attached


  • 6.  RE: Have a client with numerous SO Entry scripts. The

    Posted 08-29-2018 09:12
    Thanks, @WayneSchulz . Now I'm seeing a steak ooze across the kitchen counter.


  • 7.  RE: Have a client with numerous SO Entry scripts. The

    Posted 08-29-2018 10:10
    Beth what Robert said is correct. All scripts except button scripts run from the ""compiled master business object script"" not from the individual script file. This is a fancy way of saying all S/O Entry (header) scripts are put together in the SO_SalesOrder_bus.vbs file in \CM\Script. BUT don't ever edit that file directly. There is also a bug with deleting scripts which you've clearly run into. So I recommend for now you just disable script instead of deleting by going to User Defined Script Maintenance, open the script, and add the words `Exit Sub` at the top. Then click Accept / Compile and follow the prompts. It takes effect the next time they open a S/O Entry screen. Their current open S/O Entry screens will still run the old script.


  • 8.  RE: Have a client with numerous SO Entry scripts. The

    Posted 08-29-2018 10:24
    @AlnoorCassim - a bug! Seriously? I find that so hard to believe!!!!! Thanks for the work around!


  • 9.  RE: Have a client with numerous SO Entry scripts. The

    Posted 08-29-2018 10:42
    @AlnoorCassim - that doesn't seem to be working, either. I had to add it back in, of course, but I did modify the script and recompiled. Still appears to be running. (The script fills in the Weight field with the combined weight of the components in a kit instead of using the kit weight. When I test with a kit with no weight, I'm still getting a weight.) I hate computers.


  • 10.  RE: Have a client with numerous SO Entry scripts. The

    Posted 08-29-2018 10:46
    Did you close the SO Entry screen and reopen it after you recompiled? If not, do that. If you did then another script is likely running the same code.


  • 11.  RE: Have a client with numerous SO Entry scripts. The

    Posted 08-29-2018 10:53
    Yeah, I wasn't in the screen before I tried it. But I also didn't delete the compiled script before recompiling. I'll try that when I can.


  • 12.  RE: Have a client with numerous SO Entry scripts. The

    Posted 08-29-2018 11:55
    Did you check to see if the UDF is being sourced from another object? Also, it might be worth opening both the compiled header and detail _bus.vbs files in notepad and search them for the field being manipulated by the script. There is a chance it is happening in another script file that you might not be aware of, if you do find it in the SetValue method's first parameter, scroll up until you see the first line beginning with Sub, then take note of what follows after, that is the event it is being triggered under.


  • 13.  RE: Have a client with numerous SO Entry scripts. The

    Posted 08-29-2018 12:42
    No UDFS on this particular one, but I'll look for the ShipWeight field.


  • 14.  RE: Have a client with numerous SO Entry scripts. The

    Posted 08-30-2018 02:58
    All working now


  • 15.  RE: Have a client with numerous SO Entry scripts. The

    Posted 08-30-2018 06:53
    (When disabling a script I open UDS maintenance and click Compile... this lists all active script events, so if the script is in multiple places, I'll be able to see that. UI scripts are listed separately from business object scripts).