RE: Embed a Suitelet into Dialog alert
Before we dive too far in on this, I wanted to see if anyone had any input, recommendations, etc. We have a highly complex business case for a product selector tool we’d like our business users to be able to utilize when building out a sales order without navigating away from the transaction.
To put it simply, we currently have a Suitelet that works through the standard window.open functionality. However, we are in need of a way to have the Suitelet execute within the existing window we are operating in, be it through an iFrame or some kind of modal window.
A bit of research revealed that the N/ui/dialog module is an implementation of ext.js and we might be able to “hack” our way to using a popup alert and embedding the suitelet there in the HTML. Likewise, we could try to implement jQuery and manipulate things ourselves. However both of these solutions, if successful, could break at any time.
Any advice would be appreciated!
window.opener not working in SuiteScript 2.0
Scenario
Using SuiteScript 2.0, the native Javascript window.opener does not function as it did in SuiteScript 1.0
Solution
window.opener.require([‘/SuiteScripts/Test/ps_test_client’], function(myModule) {myModule.setTestField(field1);})