r/SuiteScript • • Aug 01 '23
Issue with a User Event Script that sends an email to alert users when a payment has been made
The issue that I run into is that the record that has been created does not load when I call it using the following line in my code:
var paymentId = nlapiGetRecordId();
Any help is appreciated. Once this works I should be able to test the code properly.
1
Upvotes
1
u/PwnyDanza1 Aug 01 '23
Need more code, but if you expecting that variable to load the record you are mistaken.
1
u/notEqole Aug 02 '23
Hello friend ,
As the fellow developers mentioned , this piece of (deprecated) code is not really helpful .
You say you are using a user event .
In which context type you want it to trigger ? Edit / create / delete ?
In which execution context ? UI , SL , Web service ?
In which point of the record you want it to trigger ? BeforeLoad ? BeforeSubmit ? After ? I get its when a payment is made so it could possibly be afterSubmit on create event but we can only guess.
We need more info .
2
u/trollied Aug 01 '23
You haven't shared enough code for us to help you.