How to pass data/parameter from Suitelet to HTML

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 data = REPLACE_INTENT_HERE;
console.log("data", data);

NOTE

The parameter we can pass only as Object “{“key” : “value”}”

Leave a comment

Your email address will not be published. Required fields are marked *