Scenario: Sales Orders have item sublist Table, which lists items in each SO. If the number of items becomes too large, we need to scroll the table down, which will also scrolls the table header too. Make this table header freeze and make other details scrollable. Solution: It needs a User Event script. In it’s… Continue reading Adding Freezing Header for Sales Orders
Category: Suite scripts samples
All the samples related to suite scripts.
How to generate Basic authentication headers for REST API in suitescript?
REST API supports only ‘Basic authentication’ and ‘OAuth 1.0a’ authentication methods.We can generate Basic authentication headers for REST API requests in suitescript using suitescript modules from the username and API token(password).Authentication header need to be passed as header with every request that require authentication. If we use Postman software we can see an authentication header… Continue reading How to generate Basic authentication headers for REST API in suitescript?
Mandatory Filters to be added while updating an IF Record
//Info: HL-139 There are chances to have multiple Item Fulfillment records with the same internal id but hold some values differently.In order to make it more clear, it’s better to add these filters to the search criteria.
Using relative path for file.load() function
To open a file in a suitescript we can use file.load() function.e.g:var fileObj = file.load({id: ‘Images/myImageFile.jpg’});fileObj.description = ‘my test file’;var fileId = fileObj.save();The id field takes the path to the file like shown in the above example or internal of the exact file. See this example:var fileObj = file.load({id: 123});fileObj.description = ‘my test file’;var fileId… Continue reading Using relative path for file.load() function
Checking Test scenarios for Usage Limit Exceeded cases.
Info: HTN-104 As we know, the governance limit for Schedule script is 10000 & crossing this will result in execution failure.Normally, we reschedule scripts to overcome these conditions. But what about in the case where we perform loops that search huge records & update based on the given range. Example situation: Consider 150 customers are… Continue reading Checking Test scenarios for Usage Limit Exceeded cases.
Adding Loading symbol while processing
Scenario: When some process is processing if you need to show any kind of loading symbol for representing the process may take some time. For this you need to add a loading symbol on the page Solution: For this you need to add a jQuery section with a HTML code block. The HTML code block… Continue reading Adding Loading symbol while processing
Rate Card Search
Scenario: Create a saved search for listing the rate card price of a specific billing class with a specific currency. Eg: if the billing class is ‘Consultant’ and the preferred currency is US Dollars, search result should be the corresponding currency value. Solution:
Passing values to Script parameters via Suitescript
Script parameters are useful when there is a requirement to store data specific to a script but more accessible to all users other than developers. Using script parameterswe can avoid hardcoding certain values to the code that is required to be modified often. Also these values can be modified by anyone having access to the… Continue reading Passing values to Script parameters via Suitescript