Posting here as I haven't been able to find an answer to this issue:
We have an existing Policy to Generate the SAMAccountName values for user objects. (i.e. combination of FirstName & LastName, no more than 8 chars, , stip out restricted characters, etc.)
For a specific class of users, I wish to bypass / override this policy and use a very different set of rules.
I'm using the "onGetEffectivePolicy" Event to populate all required attributes automatically but it will not work for SAMAccountName -- presumably due to the existing Policy Generation Rule...
I've tried using the ClearEffectivePolicy method for every SAMAccountName permutation I can think of -- but no effect
Request.ClearEffectivePolicyInfo "samAccountName", EDS_EPI_UI_SERVER_SIDE_GENERATED
Request.ClearEffectivePolicyInfo "samAccountName", EDS_EPI_UI_VALUE_REQUIRED
Request.ClearEffectivePolicyInfo "samAccountName", EDS_EPI_UI_GENERATED_VALUE
Request.ClearEffectivePolicyInfo "samAccountName", EDS_EPI_UI_POLICY_RULE
Request.ClearEffectivePolicyInfo "samAccountName", EDS_EFFECTIVE_POLICY_DEFAULT_VALUES
I've tried to get the "OnGetPolicyMarker()" function to work -- with many different syntax values -- but it doesn't see to do anything...
I've even tried a Request.Put "samAccountName", xxxxxxxxxx ...
...but it only seems to work for a static value -- nothing dynamic (i.e. either read from a variable like "Request.Get("sn"), or as per a Policy Generation Rule -- "%<sn>" )
I've even tried to make it so that the generation button will set the value using CheckPropertyValues but the existing Policy always seems to have precedence rather than the "special case" rule...
Ideally, I'd like the SAMAccountName value to populate automatically as it does for other attributes using EDS_EPI_UI_POLICY_RULE
I'd like the existing Policy Display Note to be NOT shown -- to be replaced with a Custom message...
I don't want the "generate" button to show up (if possible) and I'd be making the field Read-Only by placing in the script:
Request.SetEffectivePolicyInfo "samAccountName", EDS_EPI_UI_AUTO_GENERATED, True
Any ideas on how to get this to work?