Hello Guys, can I add multiple submit buttons to a...
# suitescript
a
Hello Guys, can I add multiple submit buttons to a suitelet?. I have a PDC suitelet that have multiple actions.
z
You can. It does make them show up weird as a drop down selection though. You can also make them just simple regular addButton style.
You just have to parse the submitter button to have it operate how you need
a
Yes, they showed up weird and I need to hide some button based on filter selection. I managed to go through this using regular button and client side script but I need to fire the server side processing
If I submit the form on the client side will it fire the POST action
?
z
Only show the submitter buttons when the conditions are met. You should be able to use the removeButton API as well. No it won't if you use client side buttons.
if (logic here) { responseForm.addSubmitButton({ label: 'Submit }); } else { responseForm.addSubmitButton({ label: 'Validate' }); } } if (context.request.parameters.submitter === 'Submit') { 'do post logic here'}
a
Yes, Thank you. some cases I have to show up two buttons 😄.
184 Views