Skip to main content

Notifications

Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

Trying to perform calculation on subgrid

Posted on by 595

i'm trying to fetch attribute value of "major"  from "Checklist" subgrid by using below code.... but it is showing the below code as not a function error"Xrm.Page.getControl(...).getGrid(...).getRows(...).get(...).getData(...).getEntity(...).getAttribute is not a function


this is the code i used..

Xrm.Page.getControl("Checklist").getGrid().getRows().get(i).getData().getEntity().getAttributes().get("major").getValue();

  • Suggested answer
    Johao Larios Profile Picture
    Johao Larios 1,795 on at
    RE: Trying to perform calculation on subgrid

    Hello Abhilash,

    I see that you are not using the formContext(docs.microsoft.com/.../clientapi-grid-context) , I would try to fix that first, if that doesn't fix the error, then I would do the following:

    Could you please split the code used in a variables, so is more readable and will help you to find where the error is.

    You could also type step by step these script in the console panel on web developer tools on browser.

    So, something like this:

    gridConsole.png

  • Abhilash M abi Profile Picture
    Abhilash M abi 595 on at
    RE: Trying to perform calculation on subgrid

    any sugestions let me know

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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans