how can I access the current selectedmenu value in...
# ask-stanley-ai
e
how can I access the current selectedmenu value in my custom extension
c
AI generated answer (using internal Slack threads):
To access the current selected menu value in your custom extension, you can use the
getCurrentSublistValue()
method from the
N/currentRecord
module in SuiteScript 2.0. This method returns the value of a sublist field on the line currently selected in the UI. Here is a sample code snippet:
Copy code
javascript
var currentRecord = require('N/currentRecord');
var sublistName = 'yourSublistName'; // replace with your sublist name
var fieldName = 'yourFieldName'; // replace with your field name

var fieldValue = currentRecord.getCurrentSublistValue({
    sublistId: sublistName,
    fieldId: fieldName
});
Please replace 'yourSublistName' and 'yourFieldName' with the actual sublist and field names you are working with. ****** 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.772994459
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.765642524
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.765193641
Please provide your feedback on this answer.
Thank you for your feedback
Thank you for your feedback