Sarim Khan
07/08/2026, 5:11 AMCeligo AI
07/08/2026, 5:11 AMAI generated answer (using internal Slack threads):Based on the conversations, it seems that the issue you're facing is due to the context in which the Purchase Order (PO) is being created. When a PO is created from a Purchase Requisition (PR) using NetSuite's standard bulk Purchase Order creation page, the context is "Bulk Processing". However, this context is not available in the Script Deployment/Workflow -> Context Filtering, which is why your automation is not triggering. One possible solution could be to use a Scheduled Script or Map/Reduce Script instead of a User Event (UE) script or Workflow. These types of scripts are designed to handle bulk processing and do not rely on the context in which the records are created. In your Scheduled Script or Map/Reduce Script, you can load each newly created PO, check if it was created from a PR, and then perform your necessary custom form selection and field population. Here is a basic example of how you might structure this in a Scheduled Script:
javascript
define(['N/search', 'N/record'], function(search, record) {
function execute(context) {
// Create a search to find all POs created from PRs
var poSearch = search.create({
type: search.Type.PURCHASE_ORDER,
filters: [
// Add your filters here
],
columns: [
// Add your columns here
]
});
poSearch.run().each(function(result) {
// Load the PO
var po = record.load({
type: record.Type.PURCHASE_ORDER,
id: result.id
});
// Check if the PO was created from a PR
var createdFrom = po.getValue('createdfrom');
if (createdFrom) {
// Perform your custom form selection and field population here
}
return true; // Continue to the next result
});
}
return {
execute: execute
};
});
Please replace the comments with your actual logic. This is just a basic example and may need to be adjusted based on your specific requirements.
******
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
07/08/2026, 5:11 AMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.846435666
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.840515256
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.831543
Celigo AI
07/08/2026, 5:11 AM