Avatar of lweekly
 asked on

Adding a button to CRM 2011 ribbon

I have been laboring to add a button to the Contact Add tab for sending a text message.  I have a small icon that appears under Other Activities that works, but our users would like a large button just to the right of the E-Mail button.
All of the webresources exist and function from the original menu item.
I would greatly appreciate anyone that can spot what I am doing wrong and let me know.
Here's my RibbonDiffXml section, followed by the errors from the Error Log.
        <CustomActions >
          <CustomAction Id="Lon.contact.form.SendTextMessage.CustomAction"
              <Button Id="Lon.contact.form.SendTextMessage.Button"
              Image32by32="$webresource:new_TextIcon32.png" />
          <RibbonTemplates Id="Mscrm.Templates"></RibbonTemplates>
          <CommandDefinition Id="Lon.contact.form.SendTextMessage.Command">
              <EnableRule Id="Lon.contact.WebClient.EnableRule" />
              <EnableRule Id="Lon.contact.form.NotNew.EnableRule"/>
              <DisplayRule Id="Lon.contact.form.FormStateNotNew.DisplayRule" />
              <DisplayRule Id="Lon.contact.WebClient.DisplayRule" />
              <JavaScriptFunction Library="$webresource:new_SendTextMessage.js"
              FunctionName="send" />
          <TabDisplayRules />
            <DisplayRule Id="Lon.contact.form.FormStateNotNew.DisplayRule">
              <FormStateRule State="Create" InvertResult="true" />
            <EnableRule Id="Lon.contact.WebClient.EnableRule">
              <CrmClientTypeRule Type="Web" />
            <EnableRule Id="Lon.contact.form.NotNew.EnableRule">
              <FormStateRule State="Create" InvertResult="true" />
          <LocLabel Id="Lon.contact.form.SendTextMessage.LabelText">
              <Title languagecode="1033" description="Send Text Message" />
          <LocLabel Id="Lon.contact.form.SendTextMessage..ToolTip">
              <Title languagecode="1033" description="Send Text Message to this Contact" />
Error Log Items:
The ribbon item 'Lon.contact.form.SendTextMessage.Command' is dependent on <DisplayRule Id="Lon.contact.WebClient.DisplayRule" />.
The ribbon item 'Lon.contact.form.SendTextMessage.Command' is dependent on Web resource id='new_SendTextMessage.js'.
The ribbon item 'Lon.contact.form.SendTextMessage.Button' is dependent on <LocLabel Id="Lon.contact.form.SendTextMessage.ToolTip" />.
The ribbon item 'Lon.contact.form.SendTextMessage.Button' is dependent on Web resource id='new_TextIcon16.png'.
The ribbon item 'Lon.contact.form.SendTextMessage.Button' is dependent on Web resource id='new_TextIcon32.png'.
The ribbon item 'Lon.contact.form.SendTextMessage.Command' is dependent on <DisplayRule Id="Lon.contact.WebClient.DisplayRule" />.
Microsoft Dynamics

Avatar of undefined
Last Comment
Chinmay Patel

8/22/2022 - Mon
Chinmay Patel

Hi Iweekly,

Are you trying export this solution or you are just customizing the default solution?
Or you are getting this error when you try to publish?


Have you already looked at this tool? http://ribboneditor.codeplex.com/

Chinmay Patel

Hi Iweekly,

Just a thought, are you sure that the webresources you have added does have the extensions as you have mentioned in your RibbonDiffXml?
I am trying to import your Ribbon in my CRM system, and after adding these resources to the solution this errors are gone, now I am just looking at the Command definitions.

I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck

Could this be the error <LocLabel Id="Lon.contact.form.SendTextMessage..ToolTip">?
Chinmay Patel

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question