Discussions
how to access list of sales team members on an invoice record
i'm trying to access the list of sales reps on an invoice (we have 'sales team' turned on)
filters[0] = new nlobjSearchFilter('internalid',null,'equalTo',invRecord.getId());
columns[0] = new nlobjSearchColumn('salesteam_employee','salesteam')
columns[1] = new nlobjSearchColumn('salesteam_contribution','salesteam')
try{results = nlapiSearchRecord('invoice',null,filters,columns)}
gives INVALID_SEARCH_JOIN_ID
is this list accessible? how would i set the reps on an invoice?
i need to do this because we create invoices from an xml import; the external billing engine doesn't know who the sales reps are for each customer (some customers have several reps); so we need code to read the customer's sales reps and apply it to invoices as they're created by the xml import