Hello,
I was having one customization of hiding 'Add Existing' Contact ribbon button on 'new_training' Entity.
I did that using CRM Context Rule.
But now i am having a problem, when i click 'Add Existing' Contact ribbon button on other than the 'new_training' entity, it shows me Account data than Contacts.
Please help me in this.
I modified RibbonDiff xml to below for Contact Entity.
<RibbonDiffXml><CustomActions /><Templates><RibbonTemplates Id="Mscrm.Templates"></RibbonTemplates></Templates><CommandDefinitions><CommandDefinition Id="Mscrm.AddExistingRecordFromSubGridAssociated"><EnableRules><EnableRule Id="Mscrm.AppendToPrimary" /><EnableRule Id="Mscrm.EntityFormIsEnabled" /></EnableRules><DisplayRules><DisplayRule Id="new.contact.DisplayRule4.DisplayRule" /><DisplayRule Id="Mscrm.AddExisting" /><DisplayRule Id="Mscrm.AppendSelected" /><DisplayRule Id="Mscrm.AppendToPrimary" /><DisplayRule Id="Mscrm.ShowForManyToManyGrids" /></DisplayRules><Actions><JavaScriptFunction FunctionName="Mscrm.GridRibbonActions.addExistingFromSubGridAssociated" Library="/_static/_common/scripts/RibbonActions.js"><CrmParameter Value="PrimaryEntityTypeCode" /><CrmParameter Value="SelectedControl" /></JavaScriptFunction></Actions></CommandDefinition></CommandDefinitions><RuleDefinitions><TabDisplayRules /><DisplayRules><DisplayRule Id="Mscrm.AddExisting"><ReferencingAttributeRequiredRule Default="false" InvertResult="true" /></DisplayRule><DisplayRule Id="Mscrm.AppendSelected"><EntityPrivilegeRule PrivilegeType="Append" PrivilegeDepth="Basic" AppliesTo="SelectedEntity" /></DisplayRule><DisplayRule Id="Mscrm.AppendToPrimary"><EntityPrivilegeRule PrivilegeType="AppendTo" PrivilegeDepth="Basic" AppliesTo="PrimaryEntity" /></DisplayRule><DisplayRule Id="Mscrm.ShowForManyToManyGrids"><RelationshipTypeRule AppliesTo="SelectedEntity" RelationshipType="ManyToMany" /></DisplayRule><DisplayRule Id="new.contact.DisplayRule4.DisplayRule"><FormEntityContextRule EntityName="new_training" Default="true" InvertResult="true" /></DisplayRule></DisplayRules><EnableRules><EnableRule Id="Mscrm.AppendToPrimary"><RecordPrivilegeRule PrivilegeType="AppendTo" AppliesTo="PrimaryEntity" /></EnableRule><EnableRule Id="Mscrm.EntityFormIsEnabled"><FormStateRule State="Disabled" InvertResult="true" /></EnableRule></EnableRules></RuleDefinitions><LocLabels /></RibbonDiffXml>
Please help.
If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"