How to load a search in Script Debugger

The code below can be used to load a search in the script debugger. The search id and the record type must be specified.

require(['N/search'],function(search){
var mySearch = search.load({
id: 'searchid',
type: 'recordtype'
});
log.debug("mySearch", mySearch)
});

Leave a comment

Your email address will not be published. Required fields are marked *