When a user clicks a button called "Split" on a sa...
# suitescript
s
When a user clicks a button called "Split" on a sales order, I am wanting to popup a dialog of all the sales order items. They then select the ones they want to move to a new sales order, click save, and wahlah, it's done. Is there a way to load a form or html inside a dialog? Or is the only option to navigate the user to a suitelet?
c
You can use
nlExtOpenWindow
to open a popup suitelet
Along with listeners & localstorage to deal with when it's closed
s
do you know the suitescript 2 version?
I'm not sure I'm following you
c
Why don't you just stick a checkbox on the order line & do it when they hit save? Much less intrusive, and way easier from a dev perspective
s
They want it only from the "View" Screen
Ok, so I can put HTML in the dialog, but is there a way to increase the width of a dialog?
c
You wanna do this in a suitelet
window.open -> suitelet URL and define the window size
s
Ok, yeah that's what I just started playing with. I can look into it so feel free to say so, but do you know if there is a way to handle an on close event of that window?
c
Not natively. You'd have to attach jquery and that is highly not recommended due to the uncertainty that it introduces down the line.
s
Hmmm. Trying to figure out a way that when they submit the sweet lit it will refresh the sales order. But that could just be a training thing
Suitelet. Not sweet lit lol
c
Is the sales order already saved? Your suitelet could be full screen (window.location = SUITELET_URL vs window.open(...)) and take in the SO ID and build the form to split and then upon submit, do whatever you need to do and url.redirect back to the Sales Order which will have the new data.
s
Good idea. Yes it is already saved. I'll look at that
c
Thats the route i'd go then
s
Yeah. That's what I'm going to do. Wish that a way for me to have a native dialogue that I could add form controls to without working outside the box of netsuite