RE: Suitescript – identify Intercompany Transfer Order vs Transfer Order

Hi – We have a requirement in our suitescript to identify an Intercompany Transfer Order (ITO) from the Item Receipt object upon receiving (item receipt create). While it’s possible for us to identify a traditional TO using the ‘createdfrom’ key, we still get a false positive for ITO. For example, the following would not fail (catch) if the created from record were an ITO.

try {
varTO=record.load({
id: createdFromId,
type: record.Type.TRANSFER_ORDER
});
} catch (error) {
log.debug({
title: "NOT a TransferOrder",
details: JSON.stringify(error)
});
returnerror;
}

 

Is there a way to correctly identify an ITO vs a TO from the Item Receipt level?

radrunner Rookie Asked on June 10, 2020 in SuiteScript.
Add Comment
3 Answers

interesting approach….i can see only subsidiary key on the TO in a script (not a to and from)- That being said, i guess i could look at the subsidiary of the TO and the subsidiary of the item receipt and compare those. I’ll give a shot

Rookie Answered on June 10, 2020.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.