Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Unanswered

Why does the AddExistingAssoc button not appear after the dynamic CRM subgrid control writes the addLoad event?

Posted on by Microsoft Employee

I want to listen subgrid can only add one data, after I use addOnLoad, the AddExistingAssoc button is hidden, but I don't want it to be hidden, I am confused for a long time why the AddExistingAssoc button is hidden,There is no clear answer.I need your help. Thank you

This is my code:

function onLoad() {
var _rowCount = Xrm.Page.getControl("subgrid").getGrid().getTotalRecordCount();
Xrm.Page.getControl("subgrid").addOnLoad(onGridLoad);
}

steps:

1. A sub-grid is a many-to-many situation

2. The ribbon shields other new buttons. Only AddExistingAssoc buttons are open

3. No JS control button

4. The addOnLoad button is still blocked

Image:

pastedimage1642236878458v1.jpeg

pastedimage1642236890863v2.jpeg

pastedimage1642237802818v3.png

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Why does the AddExistingAssoc button not appear after the dynamic CRM subgrid control writes the addLoad event?

    Hi,

    thanks for your answer,

    Yes, when I remove addonLoad event from your subgrid, Button is visible.

    I am currently using the role of the login user as the system administrator. It is not the role that causes the error

  • Bipin D365 Profile Picture
    Bipin D365 28,964 Super User 2024 Season 1 on at
    RE: Why does the AddExistingAssoc button not appear after the dynamic CRM subgrid control writes the addLoad event?

    Hi,

    So when you remove addonload event from your subgrid, Button is visible?

    I believe you are checking this from system admin role just to avoid any role issue.

    Please mark my answer verified if this is helpful!

    Regards,

    Bipin Kumar

    Follow my Blog: xrmdynamicscrm.wordpress.com/

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,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans