You can try this: retVal = oSS.nSetProgram(oSS.nLookupTask("AR_CUSTOMER_UI")) Set oCC = oScript.NewObject("AR_CustomerCreditCard_Bus",oSS) retVal = oCC.nSetKeyValue("ARDivisionNo$", "01") retVal = oCC.nSetKeyValue("CustomerNo$", "ABF") retVal = oCC.nSetKeyValue("CreditCardGUID$", "961467e4f57a412f99837fde06584fa2") retVal = oCC.nSetKey() if retVal = 1 then retval = oCC.nSetPartialRecord("2018"+chr(138)+"01"+chr(138), oScript.Evaluate("CPL(""IOLIST ExpirationDateYear$,ExpirationDateMonth$"")") ) retVal = oCC.nWrite() if retval = 0 then msgbox oCC.sLastErrorMsg end if ExpirationDateYear$ and ExpirationDateMonth$ are defined in the schema as read only so you can't use SetValue() to set them. SetPartialRecord() can set them because it skips normal validation and business rule so use it carefully. It would be nice if AR_CustomerCreditCard_bus had an UpdateExpirationDate method.
↧