Transfer a related user to an assigned to on a parent record

We are trying to transfer a secondary related user (Sales Rep) from an account request to be the Assigned To of the parent Account once the request is complete.

How would I go about doing this. I have tried looking through the process definitions but nothing has had any solution so far.

  • Hi Scott MacLeod,

    Out of the box, SugarBPM does not allow for this.

    However, a simple change on the database does make this possible.

    When you add a Change Field Action to a Process Definition targeting Accounts, for example, and you set the Assigned To user of the related parent Account to Record Owner, the configuration of that action is set on the database in JSON in the field: pmse_bpm_activity_definition.act_fields.

    [{"name":"Assigned to","field":"assigned_user_id","value":"owner","type":"user","label":"Record Owner"}]

    If you make a custom user relate-type field in Studio for the Accounts module, and this is the first relate-type field to Users you have made, the value for that will be stored in the database at accounts_cstm.user_id_c

    Therefore, changing the JSON for the Change Field event to the following would set the parent Account's owner to the custom user relate-type field's value:

    [{"name":"Assigned to","field":"assigned_user_id","value":"{::Accounts::user_id_c::}","type":"user","label":"custom user"}]

    When this change is made in the database, the process definition looks like this:

     {SugarClub Administrator Edit: We're sorry, but this image is no longer available}  

    I hope this helps!

  • Hi ,

    Patrick's solution still works great if you are not hosted in SugarCloud and can access your database directly. If you are on SugarCloud or prefer not to make direct database edits, our new offering, Upsert BPM Essentials, introduces a new custom action to set the assigned user of a record dynamically based on any user field from the target or related module - all from the SugarBPM UI! You choose the module and associated user field (stock user fields, custom relationships, and custom relate fields are all supported), and you have the added benefit of choosing whether to define who to assign as a backup in the event that user is unavailable.

    Please let me know if you have any questions on how Upsert BPM Essentials can help meet this need!