Articles tagged #CLIENT
Articles tagged
#CLIENT
Use Advanced Rest Client (ARC) to Test Web Services Requests
This solution applies for users who want to test out sending Web Services requests using the Google Advanced Rest Client (ARC).Advanced Rest Client is a Google Chrome Application that can be used to test one's Web Services requests, by sending it directly to NetSuite.
Get Total Unbilled PO Amount on Vendor Record Using Client Side Script
The total unbilled amount which can be seen in theAmountfield on theVendorrecord is based on the items' total quantity multiplied by their respective amounts. Some use cases permits users to change the rate of each item on theVendor Billrecord which will sometime exceed the totalPurchase Orderamount set in thePurchase Orderrecord.
Call Client Scripts from Workflow
Scenario
Below is an example to demonstrate how this is done. This requires basic SuiteScript and Workflow knowledge.
Solution
- Create a JavaScript file with the following codes:
Note:The above function will be called by the Workflow on Step 5.4.functionsayHello(s){alert('Hello '+s);/* * return true|false line is required to allow/disallow the workflow action to execute. * Condition will treat the function returned false if this line is omitted. * Thus, Workflow Action (e.g. Set Field Value) will not execute */returntrue;}
- Navigate toCustomization>Scripting>Scripts>New
- Click on the+logo beside theScript FilePopup List
- Select the JavaScript file on the File Popup Window and click onSave
- UnderDeploymentstab, add the record (Applies Tocolumn) script & workflow must be applied to (For this example,Customerrecord is used and click onSave)
- Navigate toCustomization>Workflows>Workflow>New
- Basic Information:
- Name:EnterName
Example:EnterCustomer Workflow - Record Type:SelectCustomer
- Sub Types:SelectCustomer
- Execute as Admin:EnterCheckmark
- Release Status:SelectReleased
- Name:EnterName
- Event Definition:
- On Create:EnterCheckmark
- On View or Update:EnterCheckmark
- ClickSave
- ClickState 1
- Bottom right corner:ClickNew Action
- ClickSet Field Value
- Basic Information:
- Trigger On:SelectBefore User Edit
- Event Types:SelectCreate
- Context:SelectUser Interface
- Triggering Client Fields:SelectMemo
- Condition:
- SelectFormula
- Formula:EntersayHello(nlapiGetFieldValue('companyname'))
- Triggering Client Fields:SelectMemo
- Parameters:
- Field: SelectAccount
- ClickSave
Associating Custom Code (Client SuiteScript) Files With Custom Forms
On the Custom Code subtab, define any existing client SuiteScript files to use with this form. When the script's executing function is called, the actions defined within the script (and any built-in NetSuite actions for that form type) are performed.