I have a script that I wrote and installed on the server remotely. Worked fine. It was attached to the CustomerNo field in Sales Order Entry. When the user attempted to create a sales order, as soon as they selected a Customer it locked up Sage 100 and the user had to exit out the Sage 100 and restart the program. Does anyone have any thoughts on what could be causing the work station to lock up.
sLast = ""
sDate = ""
newDate =""
oDate =""
retVal = oBusObj.GetValue("UDF_LASTACTIVITY$", sLast)
retVal = oBusObj.GetValue("OrderDate$", sDate)
retVal = oSession.FormatDate(sLast, newDate,"%M/%D/%Y")
retVal = oSession.FormatDate(sDate, oDate,"%M/%D/%Y")
newDate = DateAdd("D",730,newDate)
newDate = oSession.GetFormattedDate(CStr(newDate))
oDate = oSession.GetFormattedDate(CStr(oDate))
If newDate < oDate Then MsgBox("Please request new credit information as it has been 24 months since last activity")End IF