Mayesh Nadesan
02/28/2025, 6:21 AMCeligo AI
02/28/2025, 6:21 AMAI generated answer (using internal Slack threads):To get the purchase order status when creating or editing an item receipt for a purchase order in Restlet JS, you would need to load the purchase order record and then get the status field. Here is a sample code snippet:
javascript
var record = nlapiLoadRecord('purchaseorder', poId); // poId is the internal id of the purchase order
var status = record.getFieldValue('status');
In this code, nlapiLoadRecord
is used to load the purchase order record using its internal id. Then getFieldValue
is used to get the value of the status field.
Please note that the status field will return the text of the status (e.g., "Pending Receipt", "Pending Bill", etc.). If you need the internal id of the status, you should use getFieldText
instead of getFieldValue
.
******
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/28/2025, 6:21 AMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.804633677
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.803528488
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.794105053
Celigo AI
02/28/2025, 6:21 AM