Created a simple script to pull a CI_Item UDF into a BM_ProductionHeader UDF in order to show the value on the production entry screen. The script is set to run post validate on BillNo in Production Header. Works beautifully n v2016 standard on my local machine but does't return the value in v2014 Premium on hte client setup. The original script that I used as my starting point was written in v2014 for BOM so I didn't expect to have an issue with the non-framework version. The script finds the Bill Number as an Item just fine, but is not retrieving the UDF value from CI_Item. Any ideas on what needs to be modified for it to work in the v2014 client environment? @AlnoorCassim @NicoleRonchetti
Attached is a screenshot of the trace window .
Here is the script syntax:
sItemCode = """" : sConversion = """"
sItemCode = value
r=oScript.DebugPrint(""sItemCode "" & sItemCode)
If IsObject(oItem) = False Then
Set oItem = oSession.AsObject(oSession.GetObject(""CI_ItemCode_svc""))
End If
retFind = oItem.Find(sItemCode)
If retFind = 1 Then
r=oScript.DebugPrint(""Found "" & sItemCode) 'set the trace window
retVal= oitem.GetValue(""UDF_CONVERSION$"",sConversion)
r=oScript.DebugPrint(""Read sConversion "" & sConversion)
retVal= oBusObj.SetValue(""UDF_BM_PROD_CONVERSION$"", sConversion)
r=oScript.DebugPrint(""Write sConversion"" & sConversion)
else
r=oScript.DebugPrint(""Did NOT Find "" & sItem & "" sConversion"" & sConversion)
'set the trace window
r=oScript.DebugPrint(""No Value written to Screen"")
End if