I'm trying to render a suitelet in an iframe and i...
# suitescript
c
I'm trying to render a suitelet in an iframe and it's not going well. If anyone has done this successfully, was it worth the effort?
s
Yep, its pretty straightforward I believe.
Copy code
var iframeurl= url.resolveScript({
                scriptId: 'customscript_idhere',
                deploymentId: '1',
            });

iframeField.defaultValue = "<iframe style= 'display: none' id= 'iframeid' title: 'Gimme a Name' width = '100%' height= '180' src=" + iframeurl + "></iframe>";
And append url with any extra params youve set the suitelet up to read with
&param1=something
, etc
e
I think the question is the other way round. "... render Suitelet in iFrame" rather than "... iFrame in Suitelet"
👍🏻 1
Append “ifrmcntnr=T” to the external URL when embedding in iFrame especially if you are using Firefox. (For more about NetSuite and iFrame, see Embedding an Online Form in your Web Site Page.)
🎉 1
c
That extra param has done the trick.