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

Forum Post: Script to update Required Date Not Working

$
0
0
In AP we have created a UDF in Vendor Maintenance to hold the lead time for a Vendor. In Purchase Order we have created a UDF that uses the AP UDF as the data source. Works fine. When a new purchase order is created the UPD is correctly populated. We next wanted to create a script that would change the RequiredShipDate to Order Date plus the Lead Time UDF figure. The UDF is setup as numeric.  Currently the script is not working and not sure why.  Here is the script. Any thoughts? sDate="" Ship="" newDate="" retVal=oBusObj.GetValue("RequiredExpireDate$",sDate) retVal=oBusObj.GetValue("UDF_LEAD_TIME$",Ship) retVal = oSession.FormatDate(sDate, newDate, "%M/%D/%Y") newDate =DateAdd("D", Ship, newDate) newDate = oSession.GetFormattedDate(CStr(newDate)) retVal = oBusObj.SetValue("RequiredExpireDate$",newDate) When we get this finished we will run a Knowledge Sync alert on pass due purchase orders. Of course I can do this in KS but want the purchase order to reflect the real required date.    

Viewing all articles
Browse latest Browse all 37010

Trending Articles



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