how to make form to activate after click button in CRM with javascript ?
*This post is locked for comments
how to make form to activate after click button in CRM with javascript ?
*This post is locked for comments
I can change the status to active, but the form is still read only
Another option is to use webapi and setting the StateCode and Statuscode fields.
If you want to go this route, below is a link to another article comparing some of the different libraries that are available for usage with webapi:
community.dynamics.com/.../webapi-library-comparison-in-dynamics-365
So, if you created the custom button already that calls a JavaScript function, you are set to go. If not, follow the link below to create the button with Ribbon Workbench:
The next part would be to an Action (Under Settings -> Processes) that will Activate the record. You can do that using the Workflow portion of the Action at the bottom, or by calling a Plugin.
Once you have the Action completed, you will need to add code to your JavaScript, to execute the Action. We will need to use process.js library: github.com/.../processjs in order to call that action. After the action is completed you should refresh the form, and the backend has been modified but not the front end.
Take a look at my sample article on cloning a record. You would be following almost all the same steps.
community.dynamics.com/.../cloning-a-record-in-dynamics-crm
Hope this helps.
i use custom button
Is this a custom button or are you using the CRM OOB Activate button?
If you are using your own custom button, you can do this with JavaScript and actions.
Let me know which one and I can help you further.
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,280 Super User 2024 Season 2
Martin Dráb 230,214 Most Valuable Professional
nmaenpaa 101,156