We are about to roll out the multi-partner tracking and I would like to be able to make searches/reporting easier by show all the partners that are related to one customer in one line on search results instead of a row for each partner for a single Customer. I am trying to pull from the Partner list and add a ', ' in between each partner name. I am able to get the partner names and it looks like i've got them seperated by a comma but it won't set the header field with that value. Please see the code below. I have the logexecutions in there to see that it has captured the values, which is shows it has. I have also tried nlapiSetFieldText and Value with no luck. Now I'm not sure what I'm missing and I'm sure it's something obvious.
function join_partners() { var id = nlapiGetFieldValue('companyname'); var partnernames = ''; for(var i=1; i<=nlapiGetLineItemCount('partners'); i++) { var disp = nlapiGetLineItemText('partners', 'partner', i); partnernames += disp + ', '; } nlapiLogExecution("DEBUG","Information","Company = " + id + "; Partners = " + partnernames); nlapiSetFieldText('custentity_partnersjoined', partnernames); }