How email netsuite suitelet as pdf?
Hi,
I have developed suitelet script. I have to share it via email. But due to some reason, I can’t send external url. So, I want to store suitelet page in a pdf and share that pdf over email. How will it be possible. I will appreciate an advice,
I am attaching client script to Nestuite iframe suitelet to hide div element.
Here’s the strange part: 1.If I inspect the element in the browser’s developer tools and then execute document.getElementById('abc') in the console, it returns null. 2. But, if I copy the JSON path of the element in the developer tools and then execute document.getElementById('abc') in the console, it correctly returns the element.
Below in Netsuite client script:
//Client Script
function pageInit(scriptContext) {
document.getElementById("uif37");
}
//i_frame suitelet
if (context.request.method === 'GET') {
var form = serverWidget.createForm({title: 'Monitoring System', hideNavBar: true});
// Construct URLs for child Suitelets
var fisrtiframeUrl = buildIframeUrl('scriptid', 'deployid');
var secondiframeUrl = buildIframeUrl('scriptid', 'deployid);
var fisrtiFrameHtml = "<iframe src='" + fisrtiframeUrl + "' id='view' width='50%' height='700px' scrolling='auto' name='firstframeView' marginheight='0' marginwidth='0' frameborder='0'></iframe>";
var secondiFrameHtml = "<iframe src='" + secondiframeUrl + "' id='view' width='50%' height='700px' scrolling='auto' name='secondframeView' marginheight='0' marginwidth='0' frameborder='0'></iframe>";
var combinedHtml = fisrtiFrameHtml + secondiFrameHtml;
var htmlField = form.addField({
id: 'custpage_my_iframe',
type: serverWidget.FieldType.INLINEHTML,
label: 'Performance iFrame'
});
htmlField.defaultValue = combinedHtml;
form.clientScriptModulePath = 'SuiteScripts/cs_hide_div.js';
form.addResetButton({label: 'Cancel'});
context.response.writePage(form);
}
}
This seems quite complicated. Can I ask what that basic requirement / problem is here?
Hi @chris Abbot,
Now my requirenment is,
I want to share suitelet page via email. I cant check available without login checkbox due to some reason. Is there any way to share suitelet to email which should be accessible without Netsuite login.
I am thinking to show suitelet in a PDF, But the problem is, I am getting suitelet response as HTML and I need to pass xml string to ,
//Suitelet Script
function execute(context) {
I’m not sure what you mean when you say “I want to share suitelet page via email”.
A Suitelet is a web page. Do you mean share the URL?
If I share internal URL, user has no netsuite access. So I have to share suitelet UI design without login.



