I'm trying to write a sequence that'll help me set privileges for new groups. Whenever I run my sequence, I get the following error:
-17335; Property object cannot be added.
All I'm doing in my sequence is:
I've attached a snippet of my sequence, but the error occurs with the following statement.
Locals.UserRef.AsUser.Privileges.SetPropertyObject(Priv_GrantAll, PropOption_NoOptions, Parameters.Privileges.GrantAllFlag)
I've used this method in other sequences, but I can't seem to figure out whats causing the error here. Any help or pointers to where I could look would be appreciated.
I'm using TestStand 2016 (32-bit).
Solved! Go to Solution.
Locals.UserRef.AsUser.Privileges.SetPropertyObject(Priv_GrantAll, PropOption_NoOptions, Parameters.Privileges.GrantAllFlag.Clone("", 0))
You need to clone the GrantAllFlag. You can't assign it like that because it already has a parent and cannot be disconnected.