Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Activate form with button in CRM

Posted on by 403

how to make form to activate after click button in CRM with javascript ?

*This post is locked for comments

  • Ferdiansah Profile Picture
    Ferdiansah 403 on at
    RE: Activate form with button in CRM

    I can change the status to active, but the form is still read only

  • Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: Activate form with button in CRM

    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

  • Suggested answer
    Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: Activate form with button in CRM

    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:

    community.dynamics.com/.../creating-a-ribbon-button-using-ribbon-workbench-to-call-a-javascript-action

    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.

  • Ferdiansah Profile Picture
    Ferdiansah 403 on at
    RE: Activate form with button in CRM

    i use custom button

  • Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: Activate form with button in CRM

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans