Notifications
Announcements
No record found.
Hi all..
Can anyone help me to get the code for disabling action pane button only for a particular user.
If manage is the button I want to disable it for testUser.
Can you please suggest me a link or provide the code?
Regards
Vidhus.
I don't know why you don't manage it with security objects, but if you want to do it with code (I assume it's a Custom form. Otherwise you have to do it with extensions);
Set the button's autoDeclaration property to yes and in the init method of the form ;
Button.enabled(CurUserId() != "testUser");
If you do not want to make hardCode, you can make a table and save the users who will be disabled in this table.
Note: If the active passive status of the button is calculated by the code, you need to add the user control to all the codes
Hi Sahin.
Thank you for your response.
Yes it's not a custom form.
For more background on this question, see the other question from Vidhushan: community.dynamics.com/.../1188529
Being a standard form does not change the logic of development (If it is not command button or listpage form). You just have to write the code in CoC and use the extension to change the form property.
In the other thread, friends described how to do it with security objects.
I also think that code should not be written, but if you say how to do it with code, as I described above.
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Abhilash Warrier 669 Super User 2025 Season 2
André Arnaud de Cal... 449 Super User 2025 Season 2
Martin Dráb 384 Most Valuable Professional