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.
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.
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.
For more background on this question, see the other question from Vidhushan: community.dynamics.com/.../1188529
Hi Sahin.
Thank you for your response.
Yes it's not a custom form.
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
André Arnaud de Cal...
294,157
Super User 2025 Season 1
Martin Dráb
232,930
Most Valuable Professional
nmaenpaa
101,158
Moderator