We can pass search query as a data source to a template instead of a single record data.Use the function TemplateRenderer.addQuery(options) for this. This is a part of the N/render module and is available for all server scripts(of the 2.x version).The parameters require are: ‘options.id’ of string type which stores the id of search if… Continue reading Add search query as the data source to a template
Tag: n/render module
Add custom values as the data sources to a template
We can pass custom objects, and XML values as data sources to a template instead of a single record data.Use the function TemplateRenderer.addCustomDataSource(options) for this. This is a part of the N/render module and is available for all server scripts(of the 2.x version).The parameters require are: ‘options.alias’ of string type which stores alias for the… Continue reading Add custom values as the data sources to a template