Hi All, I'm tried to create new purchase order but i got this error email below:
*** CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. ***
Account: 4499123_SB1
Environment: SandBox
Date & Time: 10/30/2018 12:27 am
Execution Time: 0.00s
Script Usage: 0
Script: VMI_RelenishConsignment
Type: Scheduled
Error: UNEXPECTED_ERROR
Ticket: jnvetnxa1j5kw77e6iiw4
Stack Trace: nlapiSubmitRecord(VMI_RelenishConsignment$16925:471)
GetVendor(VMI_RelenishConsignment$16925:19)
<anonymous>(VMI_RelenishConsignment$16925:22)
I tried my script on the Script Debugger but it success. I don't know why and can't find the solution when just got "UNEXPECTED_ERROR". here my server SuiteScript:
var itemID = '1280';
var ConsignmentPO_ID = 'custbody_consignment_po';
//Create PO
var record = nlapiCreateRecord('purchaseorder');
record.setFieldValue('entity', 353);
record.setFieldValue(ConsignmentPO_ID,'T');
record.setFieldValue('location', 12);
record.selectNewLineItem('item');
record.setCurrentLineItemValue('item','item',itemID);
record.setCurrentLineItemValue('item','quantity',10000);
record.setCurrentLineItemValue('item','rate',0);
record.setCurrentLineItemValue('item','amount',0);
record.commitLineItem('item');
var id = nlapiSubmitRecord(record, true);
nlapiLogExecution('DEBUG', 'Purchase OderID', id);
Please help me to get out of here :d
Thanks,
shinichi0802