Place tickmark in the Allow box.....
Place tickmark in the Allow box.....
the question is in the API forum, so I guess the question is how to get the transition permission via API.
Yes that is what I want to do
I haven't had to do this for a while but my initial recollection is that you need to look at the "AccessControlList" property on the state transition API object: M-Files API - StateTransition Object
When working with the access control lists via the API note that the actual property names of the various elements are designed to mimic the access control list functionality on an object in the vault, but are re-used for things like this. As a result it may be easiest to have a specific ACL configured on a state transition first, then observe the state of the resulting COM API object to see what properties do what.
this is the code so far. Can't figure out from there
Have you checked what you get back there, and what the state of the objects are?
My assumption is that the state transition's AccessControlList has a "CustomComponent", and that CustomComponent has AccessControlEntries values for each entry in the above screenshot (e.g. for the one you showed, one entry that represents the pseudo-user entry).
Is that correct so far? Or not? What are you seeing when you debug this code and look at the state of things?
When I try to pull access entries I get an interface error
Example that for each loop gives an error. So how is it supposed to be
Can you give the full error, and show the code that produces it?
In your code sample you are calling a method (developer.m-files.com/.../ that returns StateTransitionsForClient. You can't cast those items to a StateTransition.
I think you will need to use GetWorkflowAdmin to retrieve the workflow then get the state transitions from there.
© 2024 M-Files, All Rights Reserved.