locked
URGENT CRM 2013 -- Subgrid Inline Lookup filtering. RRS feed

  • Question

  •  Hi Friends,

         We have a requirement where we got 3 subgrids.

         1) User will add records to 1st Subgrid (Lets say two records added)

         2) When user clicks the magnify icon for inline lookup in 2nd Subgrid, we need to filter this lookup based on selected records in Subgrid 1

       We were able to get records ids from Subgrid 1 and preparing fetchXML  but we are unable to bind this fetchXML to inline lookup of Subgrid 2, Is it possible to do this way?

    If any one have any solution to this issue please let me know with any example code snippet. This is a urgent requirement. Very thankful for your time .


    Thanks Regards Prashanth Kamasamudram Even the least work done for others awakens the power within; even thinking the least good of others gradually instills into the heart the strength of a lion.

    Thursday, March 13, 2014 6:11 AM

All replies

  • Any suggestions please ?

    Thanks Regards Prashanth Kamasamudram Even the least work done for others awakens the power within; even thinking the least good of others gradually instills into the heart the strength of a lion.

    Thursday, March 13, 2014 9:48 AM
  • Any suggestions please ?

    Thanks Regards Prashanth Kamasamudram Even the least work done for others awakens the power within; even thinking the least good of others gradually instills into the heart the strength of a lion.

    Thursday, March 13, 2014 3:14 PM
  • I haven't tried but take a look at this link. It talks about setting some "fetchXmlForFilters" parameter.

    http://social.microsoft.com/Forums/en-US/4d19ff91-b392-46bb-ae95-578ba4e70142/crm-2013-subgrid-fetch?forum=crmdevelopment 

    Friday, March 14, 2014 6:34 AM
  •   Hi Ahmad,

            

            The link you provided is regarding SubGrid filtering with fetchXML. My requirment is to filter Subgrid inline lookup in CRM 2013.

    Thanks Regards

    Prashanth


    Thanks Regards Prashanth Kamasamudram Even the least work done for others awakens the power within; even thinking the least good of others gradually instills into the heart the strength of a lion.

    Friday, March 14, 2014 7:23 AM
  • Did you try the  "fetchXmlForFilters" parameter? By the name of it, it looks like it will filter out the lookup. Anyways, in a couple of days I will be working on the same requirement. I will let you know if this worked at all.
    Wednesday, March 19, 2014 11:57 PM
  •                 var fetchString;
                    if (parent.effectiveFetchXml) {
                        fetchString = parent.effectiveFetchXml.getAttribute("value");
                    }
                    else {
                        fetchString = parent.$find("crmGrid").GetParameter("effectiveFetchXml");
                    }

    I believe you need the effectiveFetchXml - you can parse to discover filter

    Then use

                    subGrid.control.SetParameter("fetchXml", fetchXml); //set the fetch xml to the sub grid   
                    subGrid.control.refresh(); //refresh the sub grid using the new fetch xml 

    • Proposed as answer by Chris_Cohen Thursday, March 20, 2014 8:56 AM
    Thursday, March 20, 2014 8:56 AM