Use the “Search” Component to Set the ‘url’ property of Models

The ” Search ” component includes the ” getUrl() ” method, which can be use to get the URL of the item search API of SuiteCommerce website
 When getUrl() is called, it returns a string that corresponds to the end fragment of the item search URL
Example:

var search = container.getComponent('Search');
var searchParams = {q: "bag"};
 
var searchURL = search.getUrl(searchParams);

This is example for search bag

Need to call this method in entry point file of extension
Source: NetSuite Applications Suite – Use the Search Component to Set the ‘url’ property of Models (oracle.com)

Leave a comment

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