For loading the html page the syntax is var HTML_FILE_ID = 464444; // NetSuite File id var fileContent = file.load(HTML_FILE_ID).getContents(); BY this syntax we can load this page , but can’t pass data for passing data write this line code in suitelet fileContent = fileContent.replace(/REPLACE_INTENT_HERE/g, response.body); And in Html Code add line code as: const… Continue reading How to pass data/parameter from Suitelet to HTML
Author: Vishnu P
How to link Suitelet in Html
we can link suitelet page for POST response in Html by using Ajax method syntax for linking $.ajax({ type: “POST”, url: “/app/site/hosting/scriptlet.nl?script=826&deploy=1&compid=TSTDRV2570977&h=db87afcaddd762a08db6”, // suitelet external link dataType: “json”, data: { paymentIntentId: paymentIntentId, result } });
Customer portal login
https://<accountID>.app.netsuite.com/app/login/secure/oidcprivate.nl for the Customer Center roles, Use this link for login as customer instead using enterprise login link where <accountID> is a variable representing the NetSuite account ID. Send Login Link Via E-mail Navigation Setup -> company -> system email template Add login link in email template
Sticky Note Installation Guidance
Definition Sticky notes lets employee to create and track notes on record pages . Helps to communicate effectively with others by adding recipients to ensure that only specific people have access to your note or by making it as public to make it visible to all employee Installation For sticky note need to download a… Continue reading Sticky Note Installation Guidance
Link Inbound Shipment Search to Purchase Order
Create a Inbound search for getting Shipment number Criteria : No need to add anything in here . You can add as per your requirement Result : Shipment Number (Group) for removing Multi lines and Formula (Text) Available Filters : Need To add “Item:PO” field for mapping each shipment with its Purchase order Need to… Continue reading Link Inbound Shipment Search to Purchase Order
Closing Suitelet Popup and Reloading parent Record
For closing the Suitelet popup SYNTAX window.close(); For reloading the parent record SYNTAX window.opener.location.reload(); Add above syntax’s in suitelet POST request inside Script Tag SYNTAX var html = html + ‘<script> window.opener.location.reload();window.close() </script>’; scriptContext.response.write(html);
Request Body in Postman
When we send the request as JSON string method from postman to Restlet .The request body should be parse to object to get values We give input in postman as { “id”:”345″ } In script we need object not string so the given request body need to parse Syntax JSON.parse(requestBody)
Show Script Internal ID
To show the script Internal ID select the show all internal id check box in set preferences select the check box to show the internal ids