Override the default open behavior of data rows in an entity-bound grid
Hello there, fellow power platform customizers/developers! Have you tried to override the default open behavior in subgrid and failed? What I’ve found in my research: Documentation by Microsoft says: “You can now create a command definition for an entity with Mscrm.OpenRecordItem as the value of the Id attribute (
<RibbonDiffXml>
<CustomActions />
<Templates>
<RibbonTemplates Id="Mscrm.Templates"></RibbonTemplates>
</Templates>
<CommandDefinitions>
<CommandDefinition Id="Mscrm.OpenRecordItem">
<EnableRules />
<DisplayRules />
<Actions>
<!--<JavaScriptFunction FunctionName="openDocument" Library="$webresource:tntg_openbehaviorofdatarows" />-->
<Url Address="https://www.talxis.com/" WinMode="0"></Url>
</Actions>
</CommandDefinition>
</CommandDefinitions>
<RuleDefinitions>
<TabDisplayRules />
<DisplayRules />
<EnableRules />
</RuleDefinitions>
<LocLabels />
</RibbonDiffXml>
This
<RibbonDiffXml>
<CustomActions>
<CustomAction Id="New_Mscrm.SubGrid.connection.MainTab.Actions.Controls.CustomAction" Location="Mscrm.SubGrid.connection.MainTab.Actions.Controls._children" Sequence="150">
<CommandUIDefinition>
<Button Command="Mscrm.OpenRecordItem" Id="Mscrm.OpenRecordItem" />
</CommandUIDefinition>
</CustomAction>
</CustomActions>
<Templates>
<RibbonTemplates Id="Mscrm.Templates"></RibbonTemplates>
</Templates>
<CommandDefinitions>
<CommandDefinition Id="Mscrm.OpenRecordItem">
<EnableRules />
<DisplayRules />
<Actions>
<!--<JavaScriptFunction FunctionName="openDocument" Library="$webresource:tntg_openbehaviorofdatarows" />-->
<Url Address="https://www.talxis.com/" WinMode="0"></Url>
</Actions>
</CommandDefinition>
</CommandDefinitions>
<RuleDefinitions>
<TabDisplayRules />
<DisplayRules />
<EnableRules />
</RuleDefinitions>
<LocLabels />
</RibbonDiffXml>
Now import your solution and don’t forget to publish all customizations… Happy PowerPlatforming!
To submit comments, go to GitHub Discussions.