We can expand or collapse a div by clicking a button by adding a class “show” <button type=”button” id=”button-id”>Expand-Collapse</button><div id=”content”> <p>The content to display… </p></div> <script> $( ‘#button-id’ ).on( ‘click’, function(e){jQuery(‘#content’).toggleClass(‘show’);}); </script>
Author: Shyma T
How to copy the configuration record
We can copy the configuration record of a domain for another domain with all fields and field values Navigate to Customization> List, Records & Fields> Record Types. Select the List under SC.Configuartion. Click Edit on the corresponding domain under CONFIGURATION ID. Copy the text in the field of CONFIGURATION JSON and copy to the same field of… Continue reading How to copy the configuration record
Change the image of Credit Card Icons
Navigate to Setup> Accounting> Accounting Lists. Select Payment Method on the Filter. Click Edit on the desired method, then change the url of the image under Payment Visuals subtab. Click Save.
Logout Function
We can add a “log-off” option to my-account or checkout pages with a button or link using a data-action
Commerce Categories tab is missing
The tab “Commerce Categories” and “Commerce Catalogs” are missing Navigate to Commerce > Content Management > Commerce Catalogs / Commerce Catalogs Solution : Navigate to Setup > Company > Enable Features Check the checkbox “COMMERCE CATEGORIES” under Web Presence tab
SCA- run the backup or source locally
Fetch the backup (zip) from corresponding application folder from netsuite. Extract the files and open the terminal. Enter the following commands (Ensure the node used is correct) npm install gulp local To run the source replace the modules extracted from backup with source modules If the folder “ns_npm_repository” is missing then add it from backup
Add a new variable to getcontext method of a view
By extending the View File from an entry point file of an extension, you can transfer a new variable to the associated template file. Sample code shown below
To change the order of an item
The order property specifies the order of a flexible item relative to the rest of the flexible items inside the same container. We can change the order of the two buttons without changing the template
Hide specific tab from website
To hide any tab from all devices and menu, my account, header menu, mobile devices. Example below shows the code to hide “Return” tab To hide from my-account To hide from header menu
Call javascript function after script is loaded
To call a js function after load a script we can use the function loadScript()