I am reading through the Suitescript 2.0 manual just trying to understand the manual itself let alone Suitescript. Can someone provide a simple example how a suitelet would display out to an html page? Like a simple recordtype record field value to display out to a web page. Thanks for any help.
Here is a basic "Hello World!" Suitelet in SS2.0
/**
*@NApiVersion 2.x
*@NScriptType Suitelet
*@NModuleScope SameAccount
*/
define([], function() {
function onRequest(params) {
var html = '<h1>Hello World!<h1>';
params.response.write({ output: html });
}
return {
onRequest: onRequest
};
});
I have some examples that can help you get started on some popular Suitescript 2.0 types including Suitelets at ursuscode.com. Check them out.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With