How to check the lineItemId of an item in salesOrd...
# ask-stanley-ai
m
How to check the lineItemId of an item in salesOrder via the netsuite ui?
c
AI generated answer (using internal Slack threads):
To check the lineItemId of an item in a salesOrder via the NetSuite UI, you can use the
findSublistLineWithValue
method. This method allows you to select a line in a sublist by
itemid
rather than by the
index
of the line number. Here is an example of how you can use it:
Copy code
javascript
for (var i = 0; i < items.length; i++) {
    log.debug({
        title: "Expected Ship Date: ",
        details: items[i].expectedreceiptdate,
    });
    var line = salesOrder.findSublistLineWithValue({
        sublistId: "item",
        fieldId: "itemid",
        value: items[i].itemid
    });
    salesOrder.selectLine({
        sublistId: "item",
        line: line,
    });
    salesOrder.setCurrentSublistValue({
        sublistId: "item",
        fieldId: "expectedshipdate",
        value: items[i].expectedreceiptdate,
    });
    salesOrder.commitLine({
        sublistId: "item",
    });
}
Please note that this method has some limitations and may not be a general solution for all cases. It's recommended to read the documentation on the method to make sure you can live with its limitations. ****** 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.836155593
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.82741034
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.825496793
Please provide your feedback on this answer.
m
dude how do i see that id in UI, the first item has id 1 but the second one doesnt have id 2
c
Thank you for your feedback
r
The agent isn’t yet programmed to answer follow-up questions in thread. But you can ask again in the main channel.