I’m trying to set up an approval system for purcha...
# suitescript
d
I’m trying to set up an approval system for purchase orders using a Suitelet. The idea is that an email is sent via a Workflow with an email template, and the template contains a link to the Suitelet that performs the “Approve” action. Example of the link sent in the email:
Copy code
<https://9319243-sb1.extforms.netsuite.com/app/site/hosting/scriptlet.nl?script=1372&deploy=1&custscript_approvalmail_action=approve&custscript_approvalmail_recid=43283>
Even though the Suitelet is set as Available Without Login and the audience is Online Form User, clicking the link returns the error:
Copy code
Invalid page parameter. Unable to view page.
Has anyone encountered this issue? What is the correct way to send parameters to a Suitelet via email so that non-logged-in users can perform actions?
b
Go to the suitelet script deployment and compare your url to the external url on that page. Your url is missing required query parameters
1
d
Thank you I have fixed it, I have another question, I have a workflow that add a approve button to po, i want to trigger that approve button from the script, i have tried the workflow.triggered method (with the button action id) but its not make the transition - nothing happened. any idea why?
b
Beyond making sure the ids are correct, you need to make sure that the workflow is correctly setup to work for your context/user. Its also why mixing scripts and workfows is unfavored, you need someone who understands both to develop and maintain it
d
Basically what i am struggling now (i have succeed to trigger the action from suitscript) is the condition of the button in the workflow, for example the condition is if the user is Administrator, but there is no real User because the suitlet that trigger the action is online form
b
not going to work, your user's role isnt administrator
you would need to change that condition
there isnt really a point to the condition either, anyone can use the externally available suitelet