This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Get pseudo-user id from Workflow state

Former Member
Former Member
Hi,

I have been looking into how to get a pseudo-user ID from the workflow state.
For example The user who moved the object into the state "State name"

I have been trying to get it to work using the method UserOrUserGroupIDEx unsuccessfully.
https://www.m-files.com/api/documentation/latest/index.html#MFilesAPI~UserOrUserGroupIDEx.html

I have the notification email ready to send, I just need to get the user. Any suggestions?

Thanks,
Conny
Parents
  • Former Member
    Former Member
    Thanks, Craig

    I had the wrong thinking, I was trying to retrieve the user ID from passing the workflow state into the UserOrUserGroupIDEx SetWorkflowStatePseudoUser method. I then wrongly thought that it would return the right user ID. I will get the user id now from the objects Vault.ObjectOperations.GetLatestObjVer.

    One question though, if I would like to retrieve the user ID for The user who moved the object into the state "State name"
    Suppose the state is State 1 (See below), and the object is now two states ahead. Is there some convenient way to retrieve the user from State 1?

    |no state| --> |State 1 (User 1)| --> |State 2 (User 1)| --> |State3 (user 2)|

    Would the best approach be the get the earlier object versions?
Reply
  • Former Member
    Former Member
    Thanks, Craig

    I had the wrong thinking, I was trying to retrieve the user ID from passing the workflow state into the UserOrUserGroupIDEx SetWorkflowStatePseudoUser method. I then wrongly thought that it would return the right user ID. I will get the user id now from the objects Vault.ObjectOperations.GetLatestObjVer.

    One question though, if I would like to retrieve the user ID for The user who moved the object into the state "State name"
    Suppose the state is State 1 (See below), and the object is now two states ahead. Is there some convenient way to retrieve the user from State 1?

    |no state| --> |State 1 (User 1)| --> |State 2 (User 1)| --> |State3 (user 2)|

    Would the best approach be the get the earlier object versions?
Children
No Data