how to set the default approval status for po wit...
# ask-stanley-ai
i
how to set the default approval status for po with the approval routing set to no
c
AI generated answer (using internal Slack threads):
To set the default approval status for a Purchase Order (PO) with the approval routing set to 'No', you can use a SuiteScript. However, please note that the status of a PO cannot be directly set to 'Rejected' or 'Approved' using SuiteScript if the approval routing is not enabled. Here is a sample script that you can use as a reference:
Copy code
javascript
var purchaseOrder = record.create({
    type: record.Type.PURCHASE_ORDER,
    isDynamic: true
});
purchaseOrder.setValue({
    fieldId: "approvalstatus",
    value: "2" // Assuming '2' is the internal id for 'Approved' status
});
In this script, we are creating a new Purchase Order and setting the 'approvalstatus' field to 'Approved'. Please replace '2' with the actual internal id of the 'Approved' status in your account. Please note that the internal id of the 'Approved' status can vary between different NetSuite accounts. You can find the correct internal id by checking an existing PO with 'Approved' status. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.806243539
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.805274367
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.801673055
Please provide your feedback on this answer.