I used a few other post to compile this script to add 7 days to the order date and populate a UDF date field. I tested the script and it worked but I get nervous about how I am getting the results, is it best method wise? Could someone please check it and tell me if there is a better way .
rVal = 0 nCustomerNo= "" rushDate = "" newDate = "" rVal = oBusObj.GetValue("OrderDate$", rushDate) rVal = oBusObj.GetValue("CustomerNo$", nCustomerNo) If nCustomerNo = "2407000" then rVal = oSession.FormatDate(rushDate, newDate, "%M/%D/%Y") newDate = DateAdd("D", 7, newDate) newDate = oSession.GetFormattedDate(CStr(newDate)) rVal = oBusObj.SetValue("UDF_NEEDDATE$", newDate) End If