Let’s say, we want to add a custom button in Activity group of Contact and on click it will open a window to create CustomerVisits (new_customervisit) record which is a custom activity.
Steps:
Follow the below steps to create a button in existing group.
Step #1 Create a new solution say TestSolution.
Step #2 Open newly created TestSolution and the entity on which you want to button.I have added contact entity.
Step #3 Publish All Customization
Step #4 Export the TestSolution for editing.
Step #5 Open customization.xml file from exported solution for editing.
Step #6 Find out RibbonDiffXml tag and replace the code from <RibbonDiffXml> to </RibbonDiffXml>With below code.
<RibbonDiffXml>
<CustomActions>
<CustomAction Id=”CompanyName.Form.contact.Related.Activities.CustomerVisits.CustomAction” Location=”Mscrm.Form.contact.Related.Activities.Controls._children” Sequence=”41″>
<CommandUIDefinition>
<Button Id=”CompanyName.Form.contact.Related.Activities.CustomerVisits” Command=”CompanyName.Form.contact.Related.Activities.CustomerVisits.Command” Sequence=”15″ ToolTipTitle=”$LocLabels:CompanyName.Form.contact.Related.Activities.CustomerVisits.LabelText” LabelText=”$LocLabels:CompanyName.Form.contact.Related.Activities.CustomerVisits.LabelText” ToolTipDescription=”$LocLabels:CompanyName.Form.contact.Related.Activities.CustomerVisits.Description” TemplateAlias=”isv” Image32by32=”http://<crm>:5555/PuneCRMTest/WebResources/new_customerVisits” Image16by16=”http://<crm>:5555/PuneCRMTest/WebResources/new_AppAdd” />
</CommandUIDefinition>
</CustomAction>
</CustomActions>
<Templates>
<RibbonTemplates Id=”Mscrm.Templates”></RibbonTemplates>
</Templates>
<CommandDefinitions>
<CommandDefinition Id=”CompanyName.Form.contact.Related.Activities.CustomerVisits.Command”>
<EnableRules />
<DisplayRules />
<Actions>
<Url Address=”http://<crm>:5555/PuneCRMTest/main.aspx?etn=new_customervisit&pagetype=entityrecord” PassParams=”false” WinParams=”0″ />
</Actions>
</CommandDefinition>
</CommandDefinitions>
<RuleDefinitions>
<TabDisplayRules />
<DisplayRules />
<EnableRules />
</RuleDefinitions>
<LocLabels>
<LocLabel Id=”CompanyName.Form.contact.Related.Activities.CustomerVisits.Description”>
<Titles>
<Title languagecode=”1033″ description=”CustomerVisits Description” />
</Titles>
</LocLabel>
<LocLabel Id=”CompanyName.Form.contact.Related.Activities.CustomerVisits.LabelText”>
<Titles>
<Title languagecode=”1033″ description=”CustomerVisits” />
</Titles>
</LocLabel>
</LocLabels>
</RibbonDiffXml>
Step #7 Save the customization.xml file.
Step #8 Zip the all three files (cutomiztion, solution and [Content_Types]) and import into CRM
Step #9 Remove the contact entity from TestSolution.
Step #10 Delete the solution TestSolution.
You must be logged in to post a comment.