Announcements
Hi,
I have a access team subgrid on a custom form and want to hide if the record status is closed. My question is:
How to hide add user + button from a Access Team Subgrid?
Can someone please help on this?
Thanks!
Hi Leo,
I tried it and It returns Null.
Thanks Leo for your help!
Jane
Hi Jane88,
It's very strange situation that I have the same code and position of accessTeam but I did not meet this issue.
This issue means we can not catch the div element.
I suggest that you could try to find this element in different levels, like parent.document.getElementbyId()... or window.parent.get...........
And when finishing the form loading, open F12 development tools and add the code "parent.document.getElementById("gridSAMAccessTeam_contextualButtonsContainer")" in "Watch" section to see if it exists.
I'm sorry that I've tried many ways but no result :-(
Best Regards,
Leo
I got the following error when try the code above:
TypeError: Cannot read property 'style' of null
(BTW, we use Dynamics 365 online)
Thanks!
Hi Leo,
I got the following error when try the code above:
TypeError: Cannot read property 'style' of null
(BTW, we use Dynamics 365 online)
Thanks!
I got the following error when try the code above:
TypeError: Cannot read property 'style' of null
(BTW, we use Dynamics 365 online)
Thanks!
I got the following error when try the code above:
TypeError: Cannot read property 'style' of null
(BTW, we use Dynamics 365 online)
Thanks!
Hi Jane88,
I compared my HTML code to yours and found that the structure is identical.
You could try the following code to test and see if there is any issue.
function hideButton(){ var element = parent.document.getElementById("gridSAMAccessTeam_contextualButtonsContainer"); element.style.display = "none"; }
If the issue still exists, please kindly show me the error log details and your code.
Thank you very much for your cooperation and understanding :-)
Best Regards,
Leo
sorry, how to add image?
Thanks Leo!
Please see below:
Thanks!
André Arnaud de Cal...
294,079
Super User 2025 Season 1
Martin Dráb
232,860
Most Valuable Professional
nmaenpaa
101,158
Moderator