Generate objects depending selected M-Files Users

Hello guys,

I would like to ask for help with script.

This is a story:

Some person want to create a training event (object A - training event) , whitch contains basic metadata. One of property is "Property A referencing to "M-Files Users" this is a MultiSelectLookup property, person can choose one or x users. Users to whom the records will be generated. (Object B - Training records) For example if i choose 3 values (3 users) then generate three objects B (Traning records)

When person create an Object A, (training event) after that a records are automatically created from one to several records depending on the number of selected users (property A on Object A)

I know how to do it with user groups with aliases, but i need help with some specific (individually selected user(s)) (not from groups)

For examples from groups:

1) get users from user group with alias ( iUG = Vault.UserGroupOperations.GetUserGroupIDByAlias("UG.Name"))

2) Dim UG: Set UG = Vault.UserGroupOperations.GetUserGroup(iUG)

3) For Each user In UG.Members....

Object A (name: Training event)

- property A "M-Files Users" , MultiSelectLookup) , specific individual users (one to x)

Object B (name: training record)

- the object is created for each user separately from property A

- property B "M-Files User" , SingleLookup ,  (This is a user who must confirm the record, each user has their own record)

It is the same logic. Instead of groups, but on the basis of selected specific users from person when person create a training event

Maybe with VaultUserOperations ? 

Thank you so much for help.

Parents Reply Children