×

Please give details of the problem

Skip to content

How to access and update a user's metadata

To use these functions, current user of your process must have an ADMIN profile Usually this is how we code it (each line is a variable in an activity which does nothing) :

1
mdt_save = ${get_user_metadata(user_login)}

where user_login is email of user which metadata you want to modify

1
mdt = ${mdt_save}

just in case you messed up with new metadata (you will have a backup of previous one)

1
mdt.my_metadata1=${mynewvalue for metatdata1}

so you are just modifying the metadata value you want and you don’t need to rebuild all values for each metadata

1
mdt.my_metadata2=${mynewvalue for metatdata2}

so you are just modifying the metadata value you want and you don’t need to rebuild all values for each metadata

1
update= ${save_user_metadata(user_login,mdt)}

now your metadata are updated!