I need to run a script at onLoad event of Invoice whenever user tap on button on Order ribbon CREATE INVOICE. I tried it but nothing go in my way. is there any idea or suggestion to make this working.
*This post is locked for comments
you can use a workflow to achieve it
1. Create a Workflow under Invoice.
2. Set it to Real Time Workflow ( CRM 2013 and above)
3. Set it trigger when Record is Created
if your sales person is a custom field , use update step
if your sales person = Invoice record owner , use assign
Update
first select the sales person field, then follow the below setting
Assign
Set to Assign = Invoice, Click on Set Properties, follow the below setting.
Activate your Workflow.
no I want to run it on Invoice form and also no it is not a custom button it is in built button. Also, I want to set the Order owner as sales person on Invoice form.
the script should run in "Order" Entity?
is it a custom button or?
would be better if you can explain your script, so we can figure an alternative way for you.
no, actually tapping on the button will create new invoice and load in the same window. So, I need to run the script as soon as the invoice is created.
i believed what you need is a on click event right?
if yes, Please follow the below article
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156