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.
<RibbonDiffXml>
<CustomActions >
<CustomAction Id="Lon.contact.form.SendT extMessage .CustomAct ion"
Location="Mscrm.Form.conta ct.Related .Activitie s.Controls ._children "
Sequence="25">
<CommandUIDefinition>
<Button Id="Lon.contact.form.SendT extMessage .Button"
Command="Lon.contact.form. SendTextMe ssage.Comm and"
LabelText="$LocLabels:Lon. contact.fo rm.SendTex tMessage.L abelText"
ToolTipTitle="$LocLabels:L on.contact .form.Send TextMessag e.LabelTex t"
ToolTipDescription="$LocLa bels:Lon.c ontact.for m.SendText Message.To olTip"
TemplateAlias="o1"
Image16by16="$webresource: new_TextIc on16.png"
Image32by32="$webresource: new_TextIc on32.png" />
</CommandUIDefinition>
</CustomAction>
</CustomActions>
<Templates>
<RibbonTemplates Id="Mscrm.Templates"></Rib bonTemplat es>
</Templates>
<CommandDefinitions>
<CommandDefinition Id="Lon.contact.form.SendT extMessage .Command">
<EnableRules>
<EnableRule Id="Lon.contact.WebClient. EnableRule " />
<EnableRule Id="Lon.contact.form.NotNe w.EnableRu le"/>
</EnableRules>
<DisplayRules>
<DisplayRule Id="Lon.contact.form.FormS tateNotNew .DisplayRu le" />
<DisplayRule Id="Lon.contact.WebClient. DisplayRul e" />
</DisplayRules>
<Actions>
<JavaScriptFunction Library="$webresource:new_ SendTextMe ssage.js"
FunctionName="send" />
</Actions>
</CommandDefinition>
</CommandDefinitions>
<RuleDefinitions>
<TabDisplayRules />
<DisplayRules>
<DisplayRule Id="Lon.contact.form.FormS tateNotNew .DisplayRu le">
<FormStateRule State="Create" InvertResult="true" />
</DisplayRule>
</DisplayRules>
<EnableRules>
<EnableRule Id="Lon.contact.WebClient. EnableRule ">
<CrmClientTypeRule Type="Web" />
</EnableRule>
<EnableRule Id="Lon.contact.form.NotNe w.EnableRu le">
<FormStateRule State="Create" InvertResult="true" />
</EnableRule>
</EnableRules>
</RuleDefinitions>
<LocLabels>
<LocLabel Id="Lon.contact.form.SendT extMessage .LabelText ">
<Titles>
<Title languagecode="1033" description="Send Text Message" />
</Titles>
</LocLabel>
<LocLabel Id="Lon.contact.form.SendT extMessage ..ToolTip" >
<Titles>
<Title languagecode="1033" description="Send Text Message to this Contact" />
</Titles>
</LocLabel>
</LocLabels>
</RibbonDiffXml>
Error Log Items:
The ribbon item 'Lon.contact.form.SendText Message.Co mmand' is dependent on <DisplayRule Id="Lon.contact.WebClient. DisplayRul e" />.
The ribbon item 'Lon.contact.form.SendText Message.Co mmand' is dependent on Web resource id='new_SendTextMessage.js '.
The ribbon item 'Lon.contact.form.SendText Message.Bu tton' is dependent on <LocLabel Id="Lon.contact.form.SendT extMessage .ToolTip" />.
The ribbon item 'Lon.contact.form.SendText Message.Bu tton' is dependent on Web resource id='new_TextIcon16.png'.
The ribbon item 'Lon.contact.form.SendText Message.Bu tton' is dependent on Web resource id='new_TextIcon32.png'.
The ribbon item 'Lon.contact.form.SendText Message.Co mmand' is dependent on <DisplayRule Id="Lon.contact.WebClient. DisplayRul e" />.
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.
<RibbonDiffXml>
<CustomActions >
<CustomAction Id="Lon.contact.form.SendT
Location="Mscrm.Form.conta
Sequence="25">
<CommandUIDefinition>
<Button Id="Lon.contact.form.SendT
Command="Lon.contact.form.
LabelText="$LocLabels:Lon.
ToolTipTitle="$LocLabels:L
ToolTipDescription="$LocLa
TemplateAlias="o1"
Image16by16="$webresource:
Image32by32="$webresource:
</CommandUIDefinition>
</CustomAction>
</CustomActions>
<Templates>
<RibbonTemplates Id="Mscrm.Templates"></Rib
</Templates>
<CommandDefinitions>
<CommandDefinition Id="Lon.contact.form.SendT
<EnableRules>
<EnableRule Id="Lon.contact.WebClient.
<EnableRule Id="Lon.contact.form.NotNe
</EnableRules>
<DisplayRules>
<DisplayRule Id="Lon.contact.form.FormS
<DisplayRule Id="Lon.contact.WebClient.
</DisplayRules>
<Actions>
<JavaScriptFunction Library="$webresource:new_
FunctionName="send" />
</Actions>
</CommandDefinition>
</CommandDefinitions>
<RuleDefinitions>
<TabDisplayRules />
<DisplayRules>
<DisplayRule Id="Lon.contact.form.FormS
<FormStateRule State="Create" InvertResult="true" />
</DisplayRule>
</DisplayRules>
<EnableRules>
<EnableRule Id="Lon.contact.WebClient.
<CrmClientTypeRule Type="Web" />
</EnableRule>
<EnableRule Id="Lon.contact.form.NotNe
<FormStateRule State="Create" InvertResult="true" />
</EnableRule>
</EnableRules>
</RuleDefinitions>
<LocLabels>
<LocLabel Id="Lon.contact.form.SendT
<Titles>
<Title languagecode="1033" description="Send Text Message" />
</Titles>
</LocLabel>
<LocLabel Id="Lon.contact.form.SendT
<Titles>
<Title languagecode="1033" description="Send Text Message to this Contact" />
</Titles>
</LocLabel>
</LocLabels>
</RibbonDiffXml>
Error Log Items:
The ribbon item 'Lon.contact.form.SendText
The ribbon item 'Lon.contact.form.SendText
The ribbon item 'Lon.contact.form.SendText
The ribbon item 'Lon.contact.form.SendText
The ribbon item 'Lon.contact.form.SendText
The ribbon item 'Lon.contact.form.SendText
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.
Regards,
Chinmay.
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.
Regards,
Chinmay.
Could this be the error <LocLabel Id="Lon.contact.form.SendT extMessage ..ToolTip">?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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?
Regards,
Chinmay.