François-Xavier Mangin
06/13/2025, 8:46 AMCeligo AI
06/13/2025, 8:46 AMAI generated answer (using internal Slack threads):****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ****** To automate the "generate sales order" action from the "Manage Intercompany Sales Orders" page or duplicate its behavior, you can use SuiteScript. However, it's important to note that the native "Manage Intercompany Sales Order Page" is not scriptable. Here's a general approach you can take: 1. Create a User Event or Scheduled script that will generate the Sales Order. This script will be triggered based on your specific business rules (e.g., when a certain field is updated, at a specific time, etc.). 2. In your script, you will need to create a new Sales Order record, set the necessary fields (including the Intercompany Transaction field), and then save the record. 3. Pay extra attention to the query parameters in the URL of the sales order, they are default values that you will have to set when you create the sales order. Here's a basic example of how you might create a new Sales Order in SuiteScript:
javascript
var salesOrder = nlapiCreateRecord('salesorder');
salesOrder.setFieldValue('entity', customerId);
salesOrder.setFieldValue('location', locationId);
// set other fields as necessary
nlapiSubmitRecord(salesOrder);
Please replace 'customerId' and 'locationId' with the actual IDs you want to use.
If you're not familiar with scripting, you might need to seek help from a consultant or someone with scripting experience.
For workflows, you can use the "Go To Record" action to take the user to a new Sales Order form with most or all the header level data pre-populated. However, this would require the user to manually enter items onto the Sales Order before saving.
If you need to create a Sales Order from an existing Sales Order with a different subsidiary, you might need to use scripting as workflows might not be able to handle this requirement.
Remember, this is a general approach and might need to be adjusted based on your specific requirements and business rules.Celigo AI
06/13/2025, 8:46 AMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.862589955
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.845763385
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.843613923
Celigo AI
06/13/2025, 8:46 AM