I have the below js code i used in the button using ribbon benchwork and i want automatically to update the status field to completed if users clicks on that button , but it is not working.
function (executioncontext) {
"use strict";
var formContext = executioncontext.getFormContext();
if (formContext !== null) {
}
}
im not sure if above code correct to update the field, please let me know if need to change anything here. thanks
HI,
If you are adding the button on Form then you need pass execution context as described in below link:
Once you pass this you will able to get the formcontext and above code will work.
Thanks,
Pradeep.
Please mark this as VERIFIED if it helps.
The above code works fine if i add on save of the form,,but when I add button using ribbon benchwork it doesn't work
You need to use formContext.getAttribute('azmdc_AZstatus').setValue(100000003)
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... 290,524 Super User 2024 Season 2
Martin Dráb 228,469 Most Valuable Professional
nmaenpaa 101,148