Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Onload data in subgrid

Posted on by Microsoft Employee

Hi,

I need to get some data on load to my subgrid. So is there any way to add some Onload event and Javascript or mybe is better to make whole thing in HTML?

Thank you for all answers.

SomenewGuy

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Onload data in subgrid

    Hi Luka Kadunc,

    I have a similar kind of requirement, can you please explain me how can we achieve above requirement.

    Thanks,

  • Suggested answer
    Samrando Profile Picture
    Samrando 270 on at
  • Suggested answer
    ashlega Profile Picture
    ashlega 34,475 on at
    RE: Onload data in subgrid

    Hi,

     subgrids are simply displaying related data, and that data is coming from CRM database.. do you mean you want to add some related data to the subgrid in the onload of the form?

     You can use web API to manipulate CRM data:

    msdn.microsoft.com/.../mt593051.aspx

     Or you can use a plugin..

     Still, I am not sure of the scenario where you would need to add related data to CRM in the onload of a record. If you need some other records to be associated with that one, it might be better to use onsave javascript event (or update/create plugin/workflow)

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Onload data in subgrid

    There are 3 options:

    1. If there is a relationship between the main entity and the entity of which subgrid you want to add. Then you can directly add a subgrid and show related records.

    2. If there is no direct relationship, then you can add the subgrid which will show all records, but on load of the form you can apply a filter using JS to show only required records. Check this community.dynamics.com/.../198345

    3. You can create a custom html webresource and show required data.

  • Suggested answer
    Rajkumar Rajaraman Profile Picture
    Rajkumar Rajaraman 18,108 on at

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

Featured topics

Product updates

Dynamics 365 release plans