Is it possible to create an invoice using item's external id and not internal id using a Restlet? I can accomplish this in Postman like this:
"item": {
"items": [
{
"amount": 120.0,
"item": {
"externalid": "12878"
},
"taxCode": {
"id": "13"
}
}
]
}
But when I try to set the same in Restlet, it throws an error.
var currentItem = items[i];
record.selectNewLineItem('item');
record.setCurrentLineItemValue('item', 'externalid', currentItem["exId"]);
record.setCurrentLineItemValue('item', 'quantity', currentItem["quantity"]);
record.setCurrentLineItemValue('item', 'rate', currentItem["rate"]);
record.setCurrentLineItemValue('item', 'taxcode', currentItem["taxcode"]);
record.commitLineItem('item');
{"error":{"code":"INVALID_KEY_OR_REF","message":"Invalid item reference key 12878 for subsidiary 1."}}