This topic contains 4 replies, has 0 voices, and was last updated by Vesku1980 8 years, 1 month ago.
-
AuthorPosts
-
October 17, 2016 at 9:49 am #6091
Vesku1980Hello,
I have a problem with suiteletpage. I’m using suitescript 1.0.
I’m adding Item lines to Purchase Order with suitelet.
I wan’t to open Suitelet as popup window – select items to add with check box and then when submitting the Suitelet (capture1 -> this works ok),
after this i would like to have suitelet popupwindow closed and the specific Purchase Order reloaded.
This is easily done with Client script, but i don’t know how to add this client script together with submitbutton.
If i use nlapiSetRedirectURL(‘RECORD’,’purchaseorder’,poid, false,false); the wanted Purchase Order is opened to popup (capture2).
I tried to add clientscript into Submit button with document.getElementById(“submitter”); but didn’t get that working correctly.
Any ideas how can i solve this?
Thank you,
Vesku
This is a cached copy. Click here to see the original post. -
October 17, 2016 at 10:08 am #6092
david.smithDo you need the suitelet? It sounds like everything you are doing could be done with just the client script. That way changes to the PO are only saved when the PO is saved and not on the backend while the record is open and other changes could have been made.
Vesku1980 replied on 10/17/2016, 01:21 PM: Hi! I need Suitelet because there has to be a list of items where the vendor from the purchase order is marked as Preferred vendor.
So user can easily add items for same vendor to same purchase order, which has been created by Order Items – tool.
-
October 17, 2016 at 1:56 pm #6093
david.smithPop the suitelet in a jQuery UI dialog. Use that data to populate the current form the user is on.
-
October 17, 2016 at 7:43 pm #6094
tect22Hi Vesku,
You may able to do it by using this on your Suitelet’s Post.
Code:
response.write(‘self.close();if(window.opener && !window.opener.closed){window.opener.location.reload();};’); -
October 18, 2016 at 12:59 am #6095
Vesku1980Hello,
Thank you both for assistance,
I Got it working but there is issue with confirming that you want leave page (as usually with Firefox and Chrome).
User is now happy with the suitelet page opening to same tab as PO and then returning to PO and reloading the page automatically so added items shows in item list.
Vesku
david.smith replied on 10/18/2016, 11:23 AM: Great!
You can solve this one of two ways.
1) Let the code add/edit the fields and lines returned from the suitelet but have the user click the submit button
OR
2) setWindowChanged(window, false);
I prefer the first option but I’ve used the second when I need to.
-
AuthorPosts
You must be logged in to reply to this topic.