RE: How to reference joined column result for renderer.addSearchResults

I’m trying to reference:

new nlobjSearchColumn(“upccode”,”memberItem”,null),

…to my custom PDF template using:

var renderer = nlapiCreateTemplateRenderer();
renderer.addSearchResults(‘results’, results);

but I don’t know how. Normal result column value can be referenced using:


Can anyone point me to the right direction?

Thanks in advance.

gnuwolf Rookie Asked on February 16, 2020 in SuiteScript.
Add Comment
2 Answers

I cannot find a solution in a direct way but I solved in another way.
I didn’t add the fields as joined fields but as formulatext. The unique identifier after formulatext permits to access each field separately.

var filters= [];
filters.push(new nlobjSearchFilter("internalid",null,"is", 40556971));
filters.push(new nlobjSearchFilter("accounttype",null,"anyof","@NONE@"));
var columns=[];
column=new nlobjSearchColumn("formulatext_externalid");
column=new nlobjSearchColumn("formulatext_color");
column=new nlobjSearchColumn("formulatext_size");
columns.push(new nlobjSearchColumn("accounttype"));
columns.push(new nlobjSearchColumn("quantity"));
var searchresult = nlapiSearchRecord("transaction", null, filters, columns );

Rookie Answered on June 10, 2020.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.