Can i get all the available sublist field id:s in ...
# ask-stanley-ai
l
Can i get all the available sublist field id:s in client side by using SuiteScript N/currentRecord module?
c
AI generated answer (using internal Slack threads):
Yes, you can get all the available sublist field ids in client side by using SuiteScript N/currentRecord module. However, there is no native method to directly get all the column ids of a sublist from a client script. Here is a workaround using the
getSublistFields
method:
Copy code
javascript
require(['N/currentRecord'], function (currentRecord) {
    var record = currentRecord.get();
    var sublistId = 'your_sublist_id'; // replace with your sublist id
    var fieldIds = record.getSublistFields({
        sublistId: sublistId
    });
    console.log(fieldIds); // this will log all field ids of the sublist
});
This script will return an array of field ids for the specified sublist. Please replace
'your_sublist_id'
with the id of your sublist. ****** 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.872606635
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.871515632
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.860188425
Please provide your feedback on this answer.