locked
Create a button on form ribbon for custom entity RRS feed

  • Question

  • Hi,

    I have a custom entity named "COPF". I want to create a button on the COPF entity form ribbon. I came to know that adding a button can be done by exporting the solution. But i dont know which one to export.

    Can anyone guide me.

    Regards,

    Kishan.

    Wednesday, September 7, 2011 10:24 AM

Answers

All replies

  • Wednesday, September 7, 2011 10:37 AM
  • you need to create a brand new solution. add your custom entity to it. and export the solution.

    Your ribbon definition will be sitting in customization.xml file in the exported solution.

     

    I hope this helps.


    Amreek singh Senior CRM Consultant CDC Praxa Sydney,Australia http://mscrmshop.blogspot.com/
    • Proposed as answer by Amreek Singh Wednesday, September 7, 2011 12:23 PM
    • Marked as answer by Donna EdwardsMVP Wednesday, September 14, 2011 11:35 AM
    Wednesday, September 7, 2011 12:23 PM
  • Hi,

    When i try to import the the zip file its giving me warning

    The solution file is invalid. The compressed file must cotain the following files at its root: solution.xml,customizations.xml and [Content_Types].xml.

    Can anyone suggest me in this.

    Regards,

    Kishan.

    Thursday, September 8, 2011 4:39 AM
  • When i add a new solution and added the custom entity to it all the dependencies to the custom entity also comes along with it. Then i exported the solution. I unzipped the file and zipped the unzipped folder without any changes. But it is showing me the mentioned warning.

    Can anyone suggest me in this.

    Thursday, September 8, 2011 4:46 AM
  • Hi Kishan,

    when you export the solution file. The zip solution file has all that files in it.

    after making the changes to the customization.xml, overwrite the customization.xml file in the solution zip file.

    In nutshell exported and imported solution should have exactly the same file. The only difference is the importing file will have modifications made the customization.xml file.

     

    I hope this help.

     


    Amreek singh Senior CRM Consultant CDC Praxa Sydney,Australia http://mscrmshop.blogspot.com/
    • Proposed as answer by Amreek Singh Thursday, September 8, 2011 4:48 AM
    Thursday, September 8, 2011 4:48 AM
  • Hi Amreek,

    The thing i have done is after exporting the file i unzipped it. Without making any changes again i zipped it and i imported it showing the warning

    Thursday, September 8, 2011 5:05 AM
  • check in your zip file, those files are sitting there or they are sitting another folder in the zip file.

    you can't zip the folder. you need to zip the files in the folder.

     

    I hope this make sense.


    Amreek singh Senior CRM Consultant CDC Praxa Sydney,Australia http://mscrmshop.blogspot.com/
    • Proposed as answer by Amreek Singh Thursday, September 8, 2011 5:13 AM
    • Marked as answer by Donna EdwardsMVP Wednesday, September 14, 2011 11:35 AM
    Thursday, September 8, 2011 5:13 AM
  • I have made changes in the customizations.xml file and imported the solution. But import failed.


    The ribbon item '{0}' is dependent on ribbon control id='{1}'.
    • Edited by kishanraj Thursday, September 8, 2011 5:26 AM
    Thursday, September 8, 2011 5:19 AM
  • its good to hear there is no problem with the solution import.

    Because the controlid does not exist for that entity.

    can you paste your ribbon definition and entity name


    Amreek singh Senior CRM Consultant CDC Praxa Sydney,Australia http://mscrmshop.blogspot.com/

    • Edited by Amreek Singh Wednesday, September 14, 2011 11:50 AM
    Thursday, September 8, 2011 5:28 AM
  • <RibbonDiffXml>
            <CustomActions>

      
              <CustomAction Id="CI_formlevel" Location="Mscrm.Form.new_copf.MainTab.ExportData.Controls._children" Sequence="75">
                <CommandUIDefinition>
                  <Button Id="B_formbutton" Command="Cmd_JavaScript1" LabelText="Custom Button" ToolTipTitle="My Form Button" ToolTipDescription="Form Level Button"
                  TemplateAlias="o1" Image16by16="$webresource:Icon_imgSmall" Image32by32="$webresource:Icon_imgMedium" />
                </CommandUIDefinition>
              </CustomAction>

            </CustomActions>
            <Templates>
              <RibbonTemplates Id="Mscrm.Templates"></RibbonTemplates>
            </Templates>
            <CommandDefinitions />
            <RuleDefinitions>
              <TabDisplayRules />
              <DisplayRules />
              <EnableRules />
            </RuleDefinitions>
            <LocLabels />
          </RibbonDiffXml>

    Entity Name: new_copf

    • Proposed as answer by Amreek Singh Thursday, September 8, 2011 12:31 PM
    • Unproposed as answer by Amreek Singh Thursday, September 8, 2011 12:31 PM
    Thursday, September 8, 2011 5:34 AM
  • There are few problems with this

    1. There is no commanddefinition for Command="Cmd_JavaScript1"

    Please have a look at some blog regarding this. here are few links

    http://andreaswijayablog.blogspot.com/2011/07/crm-2011-custom-button-on-custom-entity.html

     

    check out if this ribbon editor any help.

    http://ribboneditor.codeplex.com/

     

    I hope this helpsss

     


    Amreek singh Senior CRM Consultant CDC Praxa Sydney,Australia http://mscrmshop.blogspot.com/

    • Proposed as answer by Amreek Singh Thursday, September 8, 2011 12:31 PM
    • Marked as answer by Donna EdwardsMVP Wednesday, September 14, 2011 11:35 AM
    • Edited by Amreek Singh Wednesday, September 14, 2011 11:51 AM
    Thursday, September 8, 2011 12:31 PM