web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Adding button in a MSCRM form

(1) ShareShare
ReportReport
Posted on by

Hi,

I want to add a button on the form.How to do that?

suppose  Account form is there. Anywhere in the form I want to add a button ..

I have little idea that it can be done with javascript...

so can anyone elaborate this 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Rajkumar Rajaraman Profile Picture
    on at

    Hi Babu,

    You can use Ribbon workbench to customize to add a button.

    Download ribbon workbench tool from here:

    ribbonworkbench.uservoice.com/.../80806-download-ribbon-workbench-for-crm-2011-2013-2015

    Refer this:

    ribbonworkbench.uservoice.com/.../71374-1-getting-started-with-the-ribbon-workbench

    crmbuzz.blogspot.in/.../microsoft-dynamics-crm-2013-adding.html

    blog.cobalt.net/.../ribbon-workbench-solution

    Hope this helps.

    Regards,

    R.Rajkumar

    "Please mark my answer as verified if you found it helpful"

  • Mahendar Pal Profile Picture
    45,095 on at

    Hello,

    The only supported way is to add a HTML button (with the help of html web resource), there are some unsupported way to convert text box to button using java script as well.

  • Community Member Profile Picture
    on at

    Hi Raj,

    Requirement is like ,we should not use workbench.

    we have to keep the button in the below part of the form .

    any idea ..

  • Community Member Profile Picture
    on at

    Hi Mahen,

    can u please elaborate on this . I did not get u.we need any coding for that..

  • Verified answer
    Rajkumar Rajaraman Profile Picture
    on at

    Babu,

    Refer this:

    missdynamicscrm.blogspot.in/.../create-button-in-crm-form-javascript.html

    Hope this helps.

    Regards,

    R.Rajkumar

    "Please mark my answer as verified if you found it helpful"

  • Suggested answer
    Community Member Profile Picture
    on at

    Ok thanks

  • Suggested answer
    Mahendar Pal Profile Picture
    45,095 on at

    Just make sure you understand that is unsupported way of adding button to Form, but you want to go with supported way you should create HTML web resource and use that.

    If you are ok with unsupported button then here is another example: us.hitachi-solutions.com/.../xrm-2011-crm-2011-style-buttons

  • Verified answer
    Community Member Profile Picture
    on at

    Simple code snippet for adding 2 buttons: Just create an html web resource and add it on the form.

    <html>

    <head>

       <title></title>

       <meta charset="utf-8">

    </head>

    <body onload="HandleVisibility()" style="word-wrap: break-word;">

       <script src="ClientGlobalContext.js.aspx"></script>

       <script src="JavaScriptResourcename(eg. new_onchange )" type="text/javascript"></script>

       <script>

           function HandleVisibility() {

               // Onload functionality

               // Access CRM form fields

               window.parent.Xrm.Page.getControl("Name").setDisabled(false);

               window.parent.Xrm.Page.getAttribute("Name").setValue("Yes");

           }

           function ApproveOnCLick() {

               alert("Approve clicked.");

               Activity();

           }

           function RejectOnCLick() {

               alert("Reject clicked.");

           }

           function Activity() {

              //perform action

           }

       </script>

       <input id="Approve" value="Approve" style="font-family: 'Segoe UI';  font-size: 12px; font-weight: bold; " onclick="ApproveOnCLick()" type="button">

                

       <input id="Reject" value="Reject" style="font-family: 'Segoe UI'; font-size: 12px;  font-weight: bold; " onclick="RejectOnCLick()" type="button">

    </body>

    </html>

    *Mark it as verified if it helps.*

  • Community Member Profile Picture
    on at

    If you are ok with unsupported button then here is another example: us.hitachi-solutions.com/.../xrm-2011-crm-2011-style-buttons

    this will work for mscrm 2015 also...???

  • Community Member Profile Picture
    on at

    Hi Girijesh,

    thank you so much..really  helpful code ....

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans