Hi @talzo777
Do you mean you dont know how to put the code at all, or simply how to get to the OnStart (or Enable it). You can also use the OnVisible of the Form too versus OnStart
Overall the process isn't hard, it really is pretty much what I said and I do
I create a Collection of Roles and a Collection of Security Groups in the OnStart or OnVisible of the primary form(OnStart is part of the App on the top left, not the Form)
Roles can be anything you want, like I use SharePoint a lot so I dont have to have license fees from Dataverse, or I have roles in AAD. Once they are loaded then in any control you simply add things like @AARON_C said.
In my case with a collection I would do something like
Visible Property
"Admin" in Roles
Where Roles is the Collection and that returns true or false
The trick is getting the roles/groups.
What ones would you be using?
If I have helped you, I would really appreciate if you please Mark my answer as Resolved/Answered, and give it a thumbs up, so it can help others
Cheers
Thank You
Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
https://gernaeysoftware.com
LinkedIn: https://www.linkedin.com/in/michaelgernaey