Hi
i discovered Extended Controls a while ago in Active Role Web Gui and i thought that might be a good way to control code but i guess i havent really thought about using it with onGetEffectivePolicy.
- For Example i have simple Form with onGetEffectivePolicy (Key=Form / Value=Enable_Phone)
- some code that is generating dropdowns by searching some azure groups and adding result to User drop down
- User can choose group and the group is used in some further code
main goal is only to trigger the code when the form is started. In this Use Case we are searching Azure License Groups and we only want to display the manual License groups.
After Extended Controles are defined this is the code to read the Form from request and use it
function onGetEffectivePolicy($Request) { $Form = $Request.GetInControl("Form") $FormName = "Enable_Phone" if ($Form -eq $FormName) { } }
Problem now is onGetEffectivePolicy of cource means every operation in AR, so if you change somethings else in Active Directory for a user onGetEffectivePolicy tries to read the request which provides only NULL Values
Exception calling "GetInControl" with "1" argument(s): "Value cannot be null."
Its only an error in the Event Viewer and maybe you might be able to do something else for the Use Case we have but does anyone have good example for what you are using Extende Controles or what it might be for because it seems like using it with onGetEffectivePolicy might be a misconception.