Reputation: 165
I am Learning netsuite,
I am trying to fetch the Customfield "custitem_celigo_sfnc_salesforce_id" from item, on sales order module when adding that item in SO line items
here is my sample
/**
*@NApiVersion 2.x
*@NScriptType ClientScript
*/
define(['N/record', 'N/search', 'N/url', 'N/https', 'N/runtime'], function(record, search, url, https, runtime) {
function fieldChanged(context) {
var currentRecord = context.currentRecord;
var sublistName = context.sublistId;
var sublistFieldName = context.fieldId;
var line = context.line;
var SFID = context.custitem_celigo_sfnc_salesforce_id;
var descriptionValue = currentRecord.getCurrentSublistValue({
sublistId: sublistName,
fieldId: "custitem_celigo_sfnc_salesforce_id"
})
alert(JSON.stringify(currentRecord));
alert(JSON.stringify(test));
return true;
}
var exports = {};
exports.fieldChanged = fieldChanged;
return exports;
});
It is not fetching the custom field , what is the way to do that.
Thanks in advance,
Upvotes: 0
Views: 239
Reputation: 91
Try this one
var descriptionValue = currentRecord.getCurrentSublistValue({
sublistId: item,
fieldId: "custitem_celigo_sfnc_salesforce_id",
line:line
})
Upvotes: 2