Hi All
I'm seeing a very unusual issue with a subgrid ribbon button (2 buttons on a flyout anchor control) in CRM 2016.
In summary :
From one entity when I access an associated view and click on the function it calls the javascript Command behind the button and works fine. ......BUT from a different entity when I access an associated view and click on the same function button it does not trigger or call the javascript function at all. Nothing whatsoever happens.
In other words the same ribbon button on a subgrid ribbon (for bookings) is working in associated view from a Contact entity, but not from another Ticket entity.
The ribbon is created for a Booking entity which can be associated with both Contacts and Tickets.
In my ribbon I have the a flyout anchor with 2 different buttons which call the same javascript function via the Command property on the <button>.
The javascript is passed a CommandValueId via CommandProperties in order to set a status on the selected rows in the grid.
Bookings can be seen via associated view on Contact, or from an associated view on Ticket.
If I access the ribbon via the Contacts and check the associated Bookings for that Contact and I click the ChangeStatus buttons for Preliminary or Confirmed status, the javascript function is called and status processed via the function.
However doing the same from the Ticket entity, the Command behind the buttons is never triggered and the javascript never called.
Since this works for one entity and not another, I do not feel the problem is with the javascript or with the ribbon definition, but I include the ribbon definition of the CustomAction below.
<CustomAction Id="subGrid.booking.ChangeStatus.CustomAction" Location="subGrid.booking.MainTab.Controls._children" Sequence="10">
<CommandUIDefinition>
<FlyoutAnchor Command="Grid.booking.ChangeStatus.Cmd" Id="subGrid.booking.ChangeStatus" Image16by16="$webresource:changestatus.16.png" Sequence="10" TemplateAlias="o1">
<Menu Id="subGrid.booking.ChangeStatus.Menu">
<MenuSection Id="subGrid.booking.Section1.Section" Sequence="5" DisplayMode="Menu16">
<Controls Id="subGrid.booking.Section1.Section.Controls">
<Button Command="subGrid.booking.ChangeStatus.Change.Cmd" CommandValueId="30" Id="subGrid.booking.ChangeStatus.Preliminary" Image16by16="preliminary.16.png" Sequence="10" TemplateAlias="" />
<Button Command="subGrid.booking.ChangeStatus.Change.Cmd" CommandValueId="20" Id="subGrid.booking.ChangeStatus.Confirmed" Image16by16="confirmed.16.png" Sequence="20" TemplateAlias="" />
</Controls>
</MenuSection>
</Menu>
</FlyoutAnchor>
</CommandUIDefinition>
</CustomAction>
I would really like to know if anyone has an explanation for this or if anyone has experienced similar issue before.
Thanks