RE: 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);
        }
    }

 

Maira S Beginner Asked on March 10, 2025 in SuiteScript.
Add Comment
3 Answers

This seems quite complicated. Can I ask what that basic requirement / problem is here?

Advanced Answered on March 12, 2025.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.