javascript - SuiteScript: How does the dynamic mode of nlobjColumn.setURL work? -


in netsuite, have scripted search of transactions expected return results of several different transaction types. results rendered in nlobjlist. 1 of columns of said list link transaction list row represents.

in netsuite examples, accomplished like:

var column = list.addcolumn('number', 'text', 'number', 'left'); column.seturl(nlapiresolveurl('record','salesorder')); column.addparamtourl('id','id', true); 

unfortunately, transaction not acceptable record type pass nlapiresolveurl, need dynamically detect record type each row. seturl function accept second boolean parameter makes dynamic per row, not sure how works. there no examples, , jsdocs not explain usage.

does have guidance on generating list dynamic urls in netsuite?

if set dynamic argument true, first argument should column listed in data source contain base url.

column.seturl('base_url', true); column.addparamtourl('id','id', true); 

then, on each record of results, make sure have base_url set url looking for.

note, following example assumes regular javascript object instead of search result object.

rec.base_url = nlapiresolveurl('record', rec.type) 

Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -