let email = ‘john.doe@gmail.com’;let domain = email.substring(email.indexOf(‘@’) + 1); console.log(domain)
Author: Swapna Lazar
Enabling Payment Instruments Feature : Caution
On Enabling Payment Instruments feature in NetSuite account creditcard sublist is no longer included in the customer record. If any existing script uses creditcard sublist, may need to update with paymentinstruments sublist. paymentinstruments sublist is automatically created when a payment card record is created for the customer.
Set a Custom Form on View Mode Depending on a Value of a Record Field
Scenario: Users may have a need to show or hide fields in a record depending on a value of a particular field in the same record. For scenarios that there are multiple fields and form elements, user may opt in creating different Custom Entry or Transaction Forms. These custom forms should be consistent regardless of… Continue reading Set a Custom Form on View Mode Depending on a Value of a Record Field
Configuring Shipping Method in Magento
Shipping methods are managed in Stores > Configuration > Sales > Shipping Methods. Flat Rate Shipping Method Flat Rate is the standard Magento 2 shipping method that can be applied per single item or per order regardless of the product attributes such as size or weight etc. Set the values in each field as per our… Continue reading Configuring Shipping Method in Magento
Creating User Role in Magento
User Roles Login to Magento 2 admin panel Go to System > Permissions > User Role Click the “Add New Role” button Select Role Info under role information Enter the descriptive role name Enter your password under Current User Identity Verification Go to Role Resources under Role Information Set resource access to custom Select the resource checkbox that the… Continue reading Creating User Role in Magento
Inline Editing in Saved search for Custom records
Inline editing is possible for the saved search results in NetSuite. The points to be noted are given below: The display type of the custom field need to be taken into consideration Display Type Default Access Level Default Level for Search/Reporting Available for Inline Editing? Normal None/View Edit No Normal Edit Edit Yes Normal None/View… Continue reading Inline Editing in Saved search for Custom records
Rendering Custom record PDF in suitescript
For rendering a custom record PDF, First step is to create a template for the custom record. Code snippet: var renderer = render.create(); renderer.addRecord(‘record’, record.load({ type: ‘custom_rec_type’, // specify the custom record type id: parseInt(recId) })); renderer.setTemplateByScriptId(“CUSTTMPL_108_5272043_SB1_890”);// specify the template Id. var spiffPDF = renderer.renderAsPdf();
Resolve Error: “HTTP 405 Method Not Allowed” in Suitelets using POSTMAN
While using POST request in POSTMAN ,this type of error may be raised. And GET request may function properly. The error in POST request can be resolved by following methods: Make sure API is correct. Set the key/pair values of the request’s HTTP Headers to “User-Agent : Mozilla/5.0” in the posting tool. The Suitelet will… Continue reading Resolve Error: “HTTP 405 Method Not Allowed” in Suitelets using POSTMAN
Adding data in a column with multiple alignment in XML pdf template
To print the data as in first cell, with SO number and IF number, do as follows
Remove Email Link in Advanced PDF/HTML Template
Using the following method , email link of the source field value can be removed <span style = “color: #000;;font-size:12px;text-decoration: none;line-height: 120%;”>${record.entity.email?replace(‘<[^>]+>’,”,’r’)}</span>