Quantcast
Channel: Sage 100
Viewing all articles
Browse latest Browse all 36990

Forum Post: SO Header ship to reminder script

$
0
0
All, I have users who use the same ship-to number for 99.9% of orders.  I'm trying to write a script to do the following 2 things: 1.  Set the default ship-to location (this is working) 2.  Show it to them and ask if it's correct 2.  Allow them to change it for the small amount of times they'll need to. I'm firing my script on Column-Post validate for the terms field.  This successfully sets the Ship to field, but it is absolutely NOT changeable.  I'm trying to use a UDF and simply set it to something so I'll be able to check for a value here and not set the ship to if this UDF has data.  My goal is to set the ship to, prompt the user if it's correct, and if they want to chaange set the UDF value which due to an If - Then loop will skip the assigning of the Ship to code.  I'm currently just trying to see the value of my UDF, but no dice.  Here is my script: ================================================================================= 'Don't want script running in my live company if oSession.CompanyCode = "ZZZ" then 'test for user code so I can assign the correct ship to if oSession.UserCode = "CRD" Then retVal = oBusObj.GetValue("ShipToCode$", ShipTo) retVal = oBusObj.GetValue("UDF_SHIPTOCONFIRMED$", STC) retVal = oScript.SetError("Confirm is " & STC) 'retVal = oScript.SetError("Ship To is " & ShipTo) retVal = oBusObj.SetValue("ShipToCode$", "0301") end if end if ========================================================= My UDF Field Name is UDF_SHIPTOCONFIRMED, the type is checkBox (can I check for 0 or 1 with this?)  Since I've NEVER used UDF I'm sure I've got something wrong there.   Thanks! Edit SORRY version 4.40    

Viewing all articles
Browse latest Browse all 36990

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>