I know this should be a very simple operation but I cannot figure it out. I am afraid I cannot grasp the info in the API documentation although trying hard. And the samples I find do not help me much. Possibly someone has a script and could share.
So, I have a workflow where you apply for leave. There I have a multi select property "Replacement Employee" selected from the employee object. So this property is filled by the user well before leaving. The workflow remains active until the employee returns from leave and ends the workflow. A day before the departure date a notification is automatically sent to the user to remind him/her to manually select his/her Replacement in the Employee object. Likewise a new notification to remove it after return. This is often forgotten of course. The Replacement Employee is then used in all other workflows to assign also the replacement during the leave period. Built-in substitute user has its limitations as permissions do not follow.
So, if instead of the notifications, if I could set that property value automatically in the employee object things would be much easier.
I understand I need to search for the employee object. Then set the property value in that Employee object property.
Any help highly appreciated.