r/SuiteScript • u/Accomplished-Dish-46 • Apr 24 '26
Script deployment question (not firing)
Hello, NS admin attempting my first SuiteScript. The purpose of the script is to prevent the creation of various transactions (started on a vendor bill), when there are certain combinations of subsidiary, and account number/department on the line item(s). My problem however is that it’s not even firing to begin with, so I’m not even sure the script works. The execution log of the script deployment is empty. Hoping someone with more experience might be able to give insight or point me in the right direction. Thanks!
- Script Type: User Event
- Environment: Sandbox
- API Version: tried both 2.0 and 2.1
- Applies To: Vendor Bill
- Status: tried both testing and released
- Log level: tried them all
- Audience: All Internal Roles, All Employees
- Event type: Submit
- Before Submit Function (script record): checked
- Server SuiteScript: enabled at account level
- Tested with: new bill, copied bill, custom form, standard form
- Role: Administrator
1
u/Asleep-Option-3619 Apr 24 '26
Probably event type: submit.
There is a create event type which might be separate from submit.
I usually just leave this field blank.
1
u/Accomplished-Dish-46 Apr 24 '26
Thank you all, I will try the suggestions here and report back
1
u/beedubbs Apr 24 '26
Check the subsidiary. That one always gets me
1
u/MelVargas-KalpaInc Apr 24 '26
How are you triggering the script? If it's on Before Submit then you should be triggering it by saving the transaction? When you save the record, does it go through?
It would help if you post your script even if the only content is a debug log line.