Hello CS Experts,
I have a requirement to update automatically certain fields in Contact record using Button Click on Contact form.
Bellow are the fields that will be updated
My question is how to do the automatic update using javascript.
Regards,
Jorge
Hi Jolas365 ,
You may update record on click of button using JS. For that create JS web resource in CRM and write update record logic in it and call function on click of ribbon button.
To update record using JS we resource, refer below link:
https://docs.microsoft.com/en-us/power-apps/developer/model-driven-apps/clientapi/reference/xrm-webapi/updaterecord
To call JS function on click of ribbon button, refer below link:
https://www.inogic.com/blog/2018/08/java-script-execution-context-provides-form-values-on-web-as-well-as-uci-in-dynamics-365-v9-0/
https://d365demystified.com/2018/12/21/create-a-new-record-button-for-activity-type-entity-using-ribbon-workbench-d365/
I hope it helps,
Thanks.
Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365.
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,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156