I have several custom entities that are interconnected by many relationships, using a binding object that contains some binding attributes. For clarity, let me call these Superheroes and Supervillins, and the link will be Fight.
(Superhero) 1 --------- * (Fight) * -------- 1 (Supervillain)
That is, each battle is between 1 superhero and 1 supervillain, and each superhero / suppervillain combo can have any number of fights, possibly of a different type - sword, fist, etc.
All simple things so far. In fact, what I'm doing here reproduces the new Connectivity features, but uses a custom binding type that only works with Superheros and Supervillains. The reason for this is because I want to show them as a separate navigation item on the left side of the form, rather than merging them all under Connections.
Now, from the Superhero form, when I look at the related objects in the left panel, I want to show a list of fights, as well as the Supervillain that the Superhero fought over. Simple enough, I can just tweak the “Fight Associated View” to show the type of “Fight” and “Superinline”. This allows me to click right from the Superhero to the Super Vientin he fought with.
But what about if I want to do the same from Supervillain? The same “Combat Associated View” is also shown for Supervillains, but it needs to be set up to show the type of battle and the superhero associated with it ... But I don’t want the “one-size-fits-all” kind of match, both of which are Superheroes and add-ons.
I want the related view to change depending on whether I look at a Superhero or a Super Virus. Therefore, I create two new views, each of which has the necessary columns. Now I can manually switch to this view by selecting the appropriate list in each object. This works great, but I don’t want this manual step every time I watch Related Fights.
So finally I got to the question : (.. script, ) "" , Superheros Supervillains, ?
script, , :
function SuperHero_OnLoad()
{
var fightItem = Xrm.Page.ui.navigation.items.get("nav_new_fight");
fightItem.MagicFunctionThatSelectsADefaultViewOrHacksIntoTheIframeParametersOrSomething();
}
: , , , -grids. .