latest Post

Dynamics365 Custom FetchXML Sub Grids (Classic UI)

Recently we had a requirement to show Order information in a sub grid on the account page. Where this differed from a standard request was the customer wanted to show all Orders relating to the customer regardless of the association. For example, we  have multiple look ups to the account record on the Order entity for the various different parties for example Sold To, Ship To, Bill To and End User. 

To achieve this I dynamically generated a fetchXML query filtering the data based on the the id of the current record. Then using the "SetParameter" method injected the sub grid with the dynamics fetch XML  query. (see below). 

Update:  
It appears this does not work with the new Unified Interface as this stopped working during the upgrade but does work if I revert back to classic UI. Strange as I did think this was a supported method as I did not directly reference any DOM elements but it appears calling "SetParameter" was never supported. I have seen a workaround  here which talks about  overriding"Microsoft.Crm.Client .Core.Storage.DataApi.ListQuery .prototype.set_FetchXml" function. However, I prefer to use supported methods therefore I will look at achieving the same functionality using the Retrieve multiple plugin method instead. It does seem to be overkill though and I would expect Microsoft to have provided some supported function in which we could  easily inject FetchXML or Odata into a page using client side functionality.
Recommended Posts × +

2 comments:

  1. My Dear friends online, My name is sander And i live in USA, New York, I have to give this miraculous testimony, which is so unbelievable until now. I had a problem with my Ex husband 2 years ago, which lead to our break up. I was not myself again, i felt so empty inside me, my love and financial situation became worst, until a close friend of mine told me about a spell caster who helped her in the same problem too his name is Dr KADUKA, I email the spell caster and i told him my problem and i did what he asked of me, to cut the long story short. Before i knew what was happening,in less than two days my husband gave me a call and told me that he was coming back to me i was so happy to have him back to me. The most interesting part of the story is that am pregnant. Thanks to Dr KADUKA for saving my marriage and for also saving others own too. Continue your good work, If you are interested to contact the great spell caster email address: kadukatemple@gmail.com or contact him on whatsApp +393511406759

    ReplyDelete
  2. There is a great herbal man called Dr voodoo who can cure Hepatitis B virus and other deadly diseases with the use of natural herbs to cure Hepatitis B virus problems. He is from Africa and he is a great doctor and he can also cure you as well if you are have the problem And other deadly disease and here is email address voodoospelltemple66@gmail.com or Whatsapp +2348140120719 HERPES CURE,CANCER CURE,HIV/AIDS CURE,HPV CURE

    ReplyDelete