For Person object "Promote to user" user action doesn't come up in API
AnsweredHi Team,
We're facing one limitation while Promoting a Person record to Vault a User as For Person object "Promote to user" user action doesn't come up in API.
We tried few other options too but Unsuccessful.
Looking for some suggestions from this community.
Thanks in Advance.
Cheers,
Kantha
-
Official comment
Hi Kantha,
To accomplish the "Promote Person to User" action using the API, you can use the Create Object Records endpoint to create a new User object record. Within that call to create a new User, populate the source_person_id__v field with the person__sys ID of the Person object record you are promoting.
Additional documentation, for reference:
- Refer to "Create User Object Records" within the Create Object Records section of the API documentation.
- Promote Person to User within Vault Help.
-
Ryan Lacy - Thanks for your response.
In my use case, We have domain user which has to be added to our clinical vault and also to link the user to an existing person record in global directory. so that it will not create any duplicate person record in vault.
To add a domain user to a particular vault I'm using "Update membership" Option as per https://developer.veevavault.com/api/21.2/#update-vault-membership.
However, Update membership doesn't support to link source_person_id__v.
So, I'm looking for some suggestions if this can be achieved in another way.
0 -
Ryan Lacy - your response on this will be appreciated for this use case, we are doing design activity and stuck in this steps. Thanks
0 -
Hi Kantha and Shahid,
Thank you for the additional information regarding your use case. The linkage between Person and User records exists on the Person record (see the "vault_user__sys" field), so in this scenario where you already have both an existing User and an existing Person record that you are trying to link, you can accomplish that by using the Update Object Records endpoint on the existing Person (person__sys) record (https://developer.veevavault.com/api/22.3/#update-object-records). Within that call, you can provide the existing User (user__sys) record ID in the "vault_user__sys" field, which will allow you to link the two records (as an FYI, be aware that doing so will sync all shared fields between the User and Person records).
As you noted above, the Update Vault Membership endpoint does not currently support linking User and Person records, so you'll need to do this in two, separate steps (one call to update Vault membership and another for linking the records).
One last thing to consider is that you can update both Vault Membership and the User/Person linkages within the Vault UI (see https://platform.veevavault.help/en/lr/15127/#how-to-add-vault-memberships-for-domain-users). So if this is a one-time use case and only needed for a singular user (or a small subset of Users), simply using the Vault UI to make these updates may be worth considering.
I hope that provides you with enough information to move forward on this, and please let us know if those suggestions work for you or if you have any additional questions on this.
Best,
Ryan
0 -
Hi Ryan,
Thanks again for your responses and recommendations.
We tried this already and found that new person record gets created when we initiate "one call to update Vault membership" which is a potential duplicate of what we have already in vault global directory as person record.
We are planning automate this access provisioning and it is supposed to be processed as bulk.
0 -
Ryan Lacy - any insight on the Kantha's feedback. Thanks
0
Please sign in to leave a comment.
Comments
6 comments