is it possible to have a Suitelet execute when the...
# suitescript
u
is it possible to have a Suitelet execute when the user clicks "Save" after filling in an entry form? or must I bind it to a button for it to trigger? For context, I'd like to run an n/File procedure after the user is done filling in fields.
n
Sounds like a UserEventScript would be best
1
Copy code
/**
 *@NApiVersion 2.1
 *@NScriptType UserEventScript
 */

define(['N/record'], function (record) {
    function afterSubmit(context) {

    return {
        afterSubmit: afterSubmit
    }
});
u
Thanks for this. It's gone completely over my head that UserEvents are server-side.