Invert method swaps the key and values of object passed. var result = _.invert({one: 1, two : 2, three: 3}); console.log(result); // Example 2 result = _.invert({ name: ‘Sam’, age: 30}); console.log(result); Output { ‘1’: ‘one’, ‘2’: ‘two’, ‘3’: ‘three’ } { ’30’: ‘age’, Sam: ‘name’ }
Month: March 2022
Suitelet Internal URL VS External URL
//Info: TAIP-740 There are Instances in which we have to connect the URL of Suitelet to preview other pages.We Normally pass External URL in most cases, However, it’s also ok if we pass Internal URL to connect other pages & thereby perform operations. But, we have to ensure some criteria are given for this case.Internal… Continue reading Suitelet Internal URL VS External URL
How to add a timeout without set timeout function for a delay?
Sometimes the function we have written in the code will run before the page load. In such cases we can use a delay. The _.defer() function is used to invoke/call a function until the current call stack is cleared. Its major advantage is that it performs expensive computations, calculations or HTML in chunks without blocking… Continue reading How to add a timeout without set timeout function for a delay?
HTTPS webhook delivery in shopify
Register an endpoint Your endpoint must be an HTTPS webhook address with a valid SSL certificate that can correctly process event notifications. Subscribe to a webhook topic Sending a POST request to the Webhook resource in REST POST /admin/api/2022-01/webhooks.json Test the webhook Run a local server or use a publicly-available service such as Beeceptor. Receive the webhook After you register… Continue reading HTTPS webhook delivery in shopify
Basic HTTP authentication in shopify
Generate API credentials From your Shopify admin, go to Apps. Click Manage private apps, near the bottom of the page. Click Create new private app. In the App details section, enter a name for the private app and a contact email address. Shopify uses this email address to contact the developer if there is an issue with the private app,… Continue reading Basic HTTP authentication in shopify
Update Note in GT invoice
Online Form
Some Points to note when applying a script to such records like lead, Case, etc. Always release the script to all users and roles, unless it will not work for users who create these records from online (Web Context). Same for Workflow Online Case Form: The following preference overrides customers/companies in Case form Setup> Support>… Continue reading Online Form
NetSuite Client-Side Script to Hide Buttons using jQuery
Below is a NetSuite beforeLoad server-side 2.0 SuiteScript to create a hidden HTML field that allows you to inject browser-based client-side JavaScript (not a NetSuite conventional client script) that will then find the buttons and use CSS to change the visibility to hidden via JQuery. //create an inline html field var hideFld = context.form.addField({ id:’custpage_hide_buttons’,… Continue reading NetSuite Client-Side Script to Hide Buttons using jQuery
Embroidering Items
Proposed Cycle: We utilize the Assembly items feature to create a work order and will keep custom records for setting bins as follows: The cycle starts from placing an order, then work order generation, allocating bins, once shipped free the bins.
Variables in Javascript
Variables are containers that store values. You start by declaring a variable with the let keyword, followed by the name you give to the variable: Copy to Clipboard A semicolon at the end of a line indicates where a statement ends. It is only required when you need to separate statements on a single line.… Continue reading Variables in Javascript