Sage 100

 View Only
  • 1.  syntax for activating script without having to do

    Posted 06-27-2013 06:02
    syntax for activating script without having to do button click? I have created a script that populates a SO Header UDF by copying an existing field. Now I want to do this without having to click the button. Have been having a hard time finding documentation on this subject. Thoughts? The ShipExpireDate does not populate in SO Sales Order History Header. Client needs the date in the file. Don't want to enter a ship date and then have to click a button to copy the date to the UDF.


  • 2.  RE: syntax for activating script without having to do

    Posted 06-27-2013 06:05
    Is it possible to create a UDF in the order history table to pull the value automatically without having the UDF in the SO header?


  • 3.  RE: syntax for activating script without having to do

    Posted 06-27-2013 06:10
    @JeffSchwenk I'm assuming Alan means that he put a UDF on the Sales Order and Sales Order History. @alanniergarth it's not really a syntax thing to not have to click a button. if you setup a user-defined script to fire on the post-validate of one of your fields probably shipdate the script will run and you can set that UDF there.


  • 4.  RE: syntax for activating script without having to do

    Posted 06-27-2013 07:57
    @BrettLyder you are spot on. I am just having a hard time finding any instructions on how to assign on post-validate instead of using a button. I have been crreating scripts from within customizer on the Pheader panel of sales order by creating a link button. The UDF cannot be sourced in the SO Header History from the ShipDate field. It looks like I need to create a UDF in the Header and then source it to the UDF in the History Header. I was surprised the field did not exist. When you do an order history inquiry the ShipDate field is absent!


  • 5.  RE: syntax for activating script without having to do

    Posted 06-27-2013 08:04
      |   view attached
    Documentation has always been a HUGE challenge for me too! I've included one document that's been a huge help for me. But you need to start your user defined scripts a little differently than the ""old-school"" button scripts. In the User-Defined Field Maintenance go to the field that you want to attach a script to, right click and choose user-defined scripts. (That's just to get you started.)

    Attachment(s)

    pdf
    Scripting_Tips.pdf   48 KB 1 version


  • 6.  RE: syntax for activating script without having to do

    Posted 06-27-2013 13:02
    Thanks @BrettLyder ! that helps.


  • 7.  RE: syntax for activating script without having to do

    Posted 06-27-2013 14:28
    success - thanks to this group once again! I had to play around with the type of script. it was a Post-Read on the SO Header table but it worked. The SO Header History now has a UDF that matches the SO header Ship/Expire date. The SO History Inquiry displays the Ship Date UDF. Happy customer! such a simple script in case anyone else can use it. odate="""" retval = obusobj.getvalue(""ShipExpireDate"",odate) retval = obusobj.setvalue(""UDF_DATE_PROMISE$"",odate)


  • 8.  RE: syntax for activating script without having to do

    Posted 06-27-2013 14:55
    Thanks Alan. Glad the group got you over the goal line.