Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Unanswered

Unified Load Subgrid on field change Not

Posted on by 25

I have a basic Order(new_ordernumber) / Details(OrdersDetailsSubGrid) type scenario.

Changing 'Order No' fires the OrderNumber_OnChange event.

This works in the classic Web but in Unified.

The value from window.parent.document.getElementById("OrdersDetailsSubGrid") is always null so the subgrid is never loaded with the new data.

Is there another way to do this in Unified.

function OrderNumber_OnChange()
{

var orderNo= Xrm.Page.getAttribute("new_ordernumber").getValue();

var OrdersTableSubGrid= window.parent.document.getElementById("OrdersDetailsSubGrid");

   if (OrdersTableSubGrid!= null)
   {
      //fetch xml code
      var FetchXml = "<fetch mapping='logical' version='1.0' distinct='false' output-format='xml-platform'>"; + 

      "ALL the fetch stuff'
      FetchXml += "</fetch>";


      OrdersTableSubGrid.control.SetParameter("fetchXml", FetchXml);
      OrdersTableSubGrid.control.refresh();

  }
   else
  {
     setTimeout(OrderNumber_OnChange, 500);
  }

}

  • a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: Unified Load Subgrid on field change Not

    Can you please be more specific regarding "relevant" data - what criteria are for that data?

  • Grs Profile Picture
    Grs 25 on at
    RE: Unified Load Subgrid on field change Not

    I have an  input field for and order number.

    On change, I need to fetch the relevant data and load a subgrid with the detail lines.

    Sounds simple, but not so with Unified.

    Regards

    Graham

  • a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: Unified Load Subgrid on field change Not

    Graham,

    At the moment there is no known ways of making it work that way. Can you please explain your scenario - may be there is an alternative supported way to implement your requirement.

  • Grs Profile Picture
    Grs 25 on at
    RE: Unified Load Subgrid on field change Not

    Thank you, I do realize this.

    What I am looking for is a method to re load a subgrid from a fetchXRM.

    Surly there has to be an alternative.

    Regards

    Graham

  • a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: Unified Load Subgrid on field change Not

    SetParameter is not supported at all and doesn't work in UCI. So... you will have to look for alternative way on how to resolve your issue.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans