locked
How to add button within form in crm 2013 RRS feed

  • Question

  • Hi,

    I want to add button with in entity form. Please tell me how to add button in form?

    Tuesday, January 27, 2015 6:07 AM

Answers

  • add a html web resource:-

    <html><head>
        <meta charset="utf-8">
        <title></title>
        <style type="text/css">
            #Button1 {
                width: 167px;
            }
        </style>
    
    </head><body style="width: 134px;">
    
        <p>
            <input id="SaveCall" onclick="parent.createPhonecall()" type="button" value="Save Phonecall"></p>
    
    
    </body></html>

    Add this resource to the form using INSERT feature. You get an option of adding web resource to form. Button click is calling a function createPhonecall which is onload of form

    Regards Faisal

    • Proposed as answer by Faisal Fiaz Wednesday, January 28, 2015 10:38 AM
    • Marked as answer by HIMBAPModerator Saturday, February 14, 2015 3:03 PM
    Tuesday, January 27, 2015 2:28 PM

All replies

  • Hi,

    You can make a webresource with a small picture. And then on_load event in JS call this function:

        createButton: function (text, WebResource, width, eventName) {
            var ctrl = document.getElementById(WebResource + '_d');
            var button = "<table border='0' cellspacing='0' cellpadding='0'>" +
                "<tr><td width='0px'></td><td width='" + width + "'>" +
                "<input type='button' value='" + text +
                "' onclick='" + eventName + "'/></td></tr></table>";
            ctrl.innerHTML = button;
        }

    It will replace webresource on a button with text (text) and on_click event will call eventName function.

    This function make a button in the any place on form, where you can place a web resouce.


    • Edited by xjomanx Tuesday, January 27, 2015 6:30 AM
    Tuesday, January 27, 2015 6:30 AM
  • Hi,

    you can use Ribbon workbench tool to add a button in the form.

    Please refer this link.


    Regards, Rekha.J

    Tuesday, January 27, 2015 7:25 AM
  • add a html web resource:-

    <html><head>
        <meta charset="utf-8">
        <title></title>
        <style type="text/css">
            #Button1 {
                width: 167px;
            }
        </style>
    
    </head><body style="width: 134px;">
    
        <p>
            <input id="SaveCall" onclick="parent.createPhonecall()" type="button" value="Save Phonecall"></p>
    
    
    </body></html>

    Add this resource to the form using INSERT feature. You get an option of adding web resource to form. Button click is calling a function createPhonecall which is onload of form

    Regards Faisal

    • Proposed as answer by Faisal Fiaz Wednesday, January 28, 2015 10:38 AM
    • Marked as answer by HIMBAPModerator Saturday, February 14, 2015 3:03 PM
    Tuesday, January 27, 2015 2:28 PM
  • Hi Aamir Hijazi,

    You can add a button in the form by using the third party component tool, To add button on the Entity form refer this URL

    http://ribbonworkbench.uservoice.com/knowledgebase/articles/71374-1-getting-started-with-the-ribbon-workbench

    Tuesday, January 27, 2015 2:48 PM