var currGross = currentRecord.getSublistValue({ ...
# ask-stanley-ai
n
var currGross = currentRecord.getSublistValue({ sublistId: 'recmachcustrecord_cash_custody_parent_rec', fieldId: 'custrecord_cc_expense_gross_amt', line: i }); getsublist value is not a function
c
AI generated answer (using internal Slack threads):
Based on the conversations, it seems like the issue is related to the use of
getSublistValue
function in SuiteScript. In the first conversation, the user was trying to use
setSublistValue
function while creating a Customer Refund and was getting an error. The solution provided was that the record might be in
dynamic
mode and hence, the user needs to use
.selectLine()
and
setCurrentSublistValue()
functions instead. In the second conversation, the user was trying to get the values from a custom sublist columns in a Suitelet but was getting undefined. The solution provided was to use
CurrentRecord.getSublistValue
or to make the amount column editable. In the third conversation, the user was trying to get the value of the sublist in a Suitelet but was getting an error. The solution provided was to use
selectLine
and
getCurrentSublistValue
functions if the record is loaded in dynamic mode. ****** 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.852085292
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.848596692
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.847103
Please provide your feedback on this answer.