Discussions
Set Orderstatus to closed on RMAs in Scheduled script
I am running following script as scheduled script and I am trying to close all Pending Refund status RMAs. But getting below error.
var ClosedRMA = 'RtnAuth:H';
logger.debug('processClosePendingRefundRMAScheduled ', 'pendingRefundRma: '+pendingRefundRma);
var pendingRefundRmaRec = nlapiLoadRecord('returnauthorization', pendingRefundRma);
pendingRefundRmaRec.setFieldValue("orderstatus",ClosedRMA);
var closedRMArec = nlapiSubmitRecord(pendingRefundRmaRec);
INVALID_KEY_OR_REF 2/12/2010 12:02 am Srini Kanchinatham Invalid orderstatus reference key RtnAuth:H.