how to create a saved search to find a delivery no...
# ask-stanley-ai
n
how to create a saved search to find a delivery note created from a sales order for which i have the id in suitescript
c
AI generated answer (using internal Slack threads):
To create a saved search to find a delivery note (Item Fulfillment) created from a Sales Order for which you have the ID in SuiteScript, you can use the
search.create
method. Here is a sample code snippet:
Copy code
javascript
var mySearch = search.create({
    type: search.Type.ITEM_FULFILLMENT,
    columns: ["internalid", "tranid", "statusref", "status"],
    filters: ["createdFrom", "anyof", salesOrderId],
});
In this code snippet,
salesOrderId
is the internal ID of the Sales Order. The
createdFrom
field is used to link the Item Fulfillment to the Sales Order it was created from. The
anyof
operator is used instead of
is
because
createdFrom
is a multi-select field. Please note that you need to replace
salesOrderId
with the actual internal ID of the Sales Order you are interested in. ****** 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.821377158
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.820865333
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.817834377
Please provide your feedback on this answer.