SunShine
02/11/2025, 2:46 AMCeligo AI
02/11/2025, 2:46 AMAI generated answer (using internal Slack threads):To get the existing Item Receipt tranID from a specific Sales Order, you can use the
createdfrom
field in SuiteScript. This field will give you the internal id of the transaction that the Item Receipt was created from. However, it won't give you the type of the transaction.
Here is a code snippet that you can use to get the type of the transaction:
javascript
var recordType = search.lookupFields({
type: 'transaction',
id: recordId,
columns: 'type'
}).type[0].value;
In this code, recordId
is the internal id of the transaction that you got from the createdfrom
field. The lookupFields
function will return an object that contains the type of the transaction.
If you want to get the date of the Item Receipt, you can use the "Fulfilling/Receiving Transaction Fields -> Date" field in a saved search. Make sure to remove "main line = T" from your criteria.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
02/11/2025, 2:46 AMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.80629915
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.803830266
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.803664744
Celigo AI
02/11/2025, 2:46 AM