Hi Forum,
I am receiving the following error when I run an integration containing a script. The script says it has compiled successfully and is to populate the Item Resource Planning window of Inventory Item Cards. Any assistance would be appreciated
Object reference not set to an instance of an object.
Error Compiling Script 'After Document' Line 2: - Expected end of statement
Expected end of statement
The script is as per below
strSQL = "MyCon.ConnectionString = 'database=' & GPConnection.GPConnInterCompanyID " & _
"GPConnection.Open(MyCon) " & _
"Update IV00102 " & _
"set ORDERPOLICY = SourceFields('AH Inventory Item.Order Policy') " & _
"Where ITEMNMBR = SourceFields('AH Inventory Item.Item Number'), LOCNCODE = SourceFields('AH Inventory Item.Site') " & _
"set MNMMORDRQTY = SourceFields('AH Inventory Item.Min Order Qty') " & _
"Where ITEMNMBR = SourceFields('AH Inventory Item.Item Number'), LOCNCODE = SourceFields('AH Inventory Item.Site') " & _
"set MXMMORDRQTY = SourceFields('AH Inventory Item.Max Order Qty') " & _
"Where ITEMNMBR = SourceFields('AH Inventory Item.Item Number'), LOCNCODE = SourceFields('AH Inventory Item.Site') " & _
"set ORDERMULTIPLE = SourceFields('AH Inventory Item.Order Multiple') " & _
"Where ITEMNMBR = SourceFields('AH Inventory Item.Item Number'), LOCNCODE = SourceFields('AH Inventory Item.Site') " & _
"set FXDORDRQTY = SourceFields('AH Inventory Item.Fixed Order Qty') " & _
"Where ITEMNMBR = SourceFields('AH Inventory Item.Item Number'), LOCNCODE = SourceFields('AH Inventory Item.Site') " & _
"set ORDRPNTQTY = SourceFields('AH Inventory Item.Order Point Qty') " & _
"Where ITEMNMBR = SourceFields('AH Inventory Item.Item Number'), LOCNCODE = SourceFields('AH Inventory Item.Site') " & _
"set ORDRUPTOLVL = SourceFields('AH Inventory Item.Order-Up-to-Level') " & _
"Where ITEMNMBR = SourceFields('AH Inventory Item.Item Number'), LOCNCODE = SourceFields('AH Inventory Item.Site') " & _
""