imane
05/22/2025, 6:42 PMCeligo AI
05/22/2025, 6:43 PMAI generated answer (using internal Slack threads):Based on the conversations, it seems like you're dealing with a complex issue. The tracking numbers are not being generated by any of your scripts, but instead, an API error message is being populated in the field. You've also mentioned that the context shows as "suitelet" when printing debug messages. To get additional information about the context it’s called from, you can use the
executionContext
property of the script context object. This property returns a string representing the context in which the script is executing. For example, if the script is executing as a suitelet, it will return "SUITELET".
Here is a sample code snippet:
javascript
function yourFunction(context) {
var execContext = context.executionContext;
console.log('Execution Context: ' + execContext);
}
This will print the execution context to the SuiteScript logs, which can help you identify where the script is being called from.
However, if the tracking numbers are being populated with an API error message, it's possible that the issue lies with the API or the process that's calling the API. You may need to debug the API call or check the API documentation to see if there are any known issues or limitations that could be causing this problem.
Remember, the tracking numbers are usually stored in the packagetrackingnumber
field in the 'package' sublist of the Item Fulfillment record. You can access this field using the getSublistValue
method, as shown in the conversations.
Here is a sample code snippet:
javascript
var record = context.currentRecord;
var trackingNumber = record.getSublistValue({
sublistId: 'package',
fieldId: 'packagetrackingnumber',
line: 0
});
console.log('Tracking Number: ' + trackingNumber);
This will print the tracking number to the SuiteScript logs, which can help you verify if the correct tracking numbers are being saved to the field.
******
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
05/22/2025, 6:43 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.845816731
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.84320277
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.84234488
Celigo AI
05/22/2025, 6:43 PMimane
05/22/2025, 6:45 PM