Reputation: 5
I am trying to send an email when a customer presses the submit button in an online form.
I made a user event script that is able to submit an email when a new record is added via netsuite but it doesn't trigger when a record is added via an online form.
My script uses the nlapiSendEmail()
function in a userevent script in the 'afterecordsubmit' trigger and it works within netsuite, just not when used in an online form.
I am using Netsuite Sandbox, and I understand that emails sent in sandbox are sent to the logged in user in netsuite.
Do online forms trigger userevent scripts? Thank you for the help!
Upvotes: 0
Views: 1387
Reputation: 812
I am not sure what you are referring to with "online form" - if this is an order form on your online store, you would need to mark the deployment of your script to "execute in commerce context". This option is found under the "Deployments" tab on your script record.
Upvotes: 0
Reputation: 486
Try to use a workflow to send the email, and set the context as webservice
Upvotes: 2
Reputation: 915
Online forms can execute UE scripts. You might want to check your deployment status if it is set to Released and All Roles is selected on the Audience tab.
Upvotes: 1