how to make a custom suitelet to select lots afte...
# ask-stanley-ai
n
how to make a custom suitelet to select lots after which the inventory detail popup is automatically called, filled and closed / saved so the user doesn't have to fill in the inventory details themself
c
AI 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 create a custom suitelet that selects lots and automatically fills and closes the inventory detail popup, you would need to use SuiteScript. However, it's important to note that SuiteScript has limited support for subrecords in client scripts, and essentially no support for sublists on the subrecord. You can't set inventory details in a beforeLoad entry point, and as you've discovered, you can't set sublists on the subrecord in client script. The closest you will get via SuiteScript is a client script deployed on the inventory detail record. You also can't use dynamic mode methods like
selectLine
when working with records in standard mode. Instead, you should use methods that have a line parameter, like
Record.getSublistSubrecord
. Your alternatives are varying levels of DOM manipulation. However, this approach is not officially supported by NetSuite and may lead to issues in the future if NetSuite changes their DOM structure. In conclusion, while it's technically possible to create a custom suitelet that selects lots and automatically fills and closes the inventory detail popup, it would require a significant amount of custom scripting and may not be fully supported by SuiteScript.
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.823438466
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.822121382
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.820423961
Please provide your feedback on this answer.