How to get all subsidiaries showing in UI by RESTlet in Netsuite? -
i names, types, labels , available options fields except subsidiary. there 2 options subsidiary in netsuite ui. when try code, 1 subsidiary referred in employee creation.
this code snippet.
function getfields(datain) { var record = nlapicreaterecord ( datain . recordtype ); var fields = record.getallfields(); var requiredfields = {}; fields.foreach(function(fieldname){ var field = record.getfield(fieldname); if(field.mandatory === true) { var id = field.getname(); var field_details = {} field_details['type'] = field.gettype(); field_details['label'] = field.getlabel(); if(field.gettype() == 'select' || field.gettype() == 'multiselect') { var options = field.getselectoptions(); var selectoptions = {}; for(var in options) { var opt_id = options[i].getid(); selectoptions[opt_id] = options[i].gettext() } field_details['options'] = selectoptions; } requiredfields[id]=field_details; } }); return requiredfields; }
how subsidiaries available in lead , customer or contact creation?
subsidiaries retrieved based on subsidiaries set in roles not on employee creation. here before have selected 1 subsidiary in role.
if select subsidiaries appropriate role, can subsidiaries selected in role.
Comments
Post a Comment