Update information to linked and current entity

General

This workflow gives the possibility to update information beyond the saved entity.
For example,

  1. when the potential is saved, the account information is updated and saved with new information.
  2. Information from the Account is copied to the contact like the street address

This workflow also allows you to run your own dynamic field formulas, allowing the use of relation-type field formulas. Relation-type formulas can be run by setting up a workflow that runs all active formulas on the current module On save.

Needed function to proceed with this new feature:

Quick-Start Guide

  1. Create a workflow that is run After save.
  2. Select the wanted condition that triggers the workflow.
  3. Create a new task of type Run Related Entity Formulas.
  4. Give the task the settings you want and save.
  5. Save the workflow.
  6. Create a dynamic field formula that performs the wanted action.
  7. Set the dynamic field formula active so the workflow can execute it.

Workflow

There is its own task to be run after conditions are met called “Run Related Entity Formulas” which are used to make this workflow. You can find it on the picklist when you are creating the task.

Run Formulas For listing gives all fields that are related to the entity. Remember that each module needs its own workflow, for example, if the won potential changes the account type to Customer that is the first workflow, and if it also updates the contact class to Customer that is the second workflow.

Optional Pre Formula text area gives the possibility to assign variables that can be used as conditions to run the dynamic formulas. For example, given a variable that changes the account type to the customer only when a workflow variable called ‘wf_won’ is run.

{assign var='wf_won' value=1}

Note! This will trigger all active On saved -type dynamic field formulas.

Dynamic field formulas

Updating field values: The normal process of writing dynamic field formulas applies when updating field information to the needed value.

{if $wf_won==1}customer{else}{$accounttype}{/if}

In this case, it only changes the type to the customer when workflow on potential is stated in the Pre-formula triggers the formula.

Copying field values: If information should be copied from another entity to another then field formulas are written like this {$rel_fieldname}. For example, the Account street address should be copied to the contact when the entity is saved. Select mailing street as the target field to run formulas to.

{if $rel_bill_street}{$rel_bill_street}{else}{$mailingstreet}{/if}

In this case, it checks that it is run via workflow and uses the field information from the relation that is selected in the workflow, and in other cases, it keeps the contact mailing address.

Exceptions

Account and Contact cannot be triggered when using the Activity multi-relations fields on top of the activity view. Go-around: contact and account custom fields can be triggered.

If updating information on a row-based module (Invoice, Sales order, Purchase order, or Quote) the row formulas are not run.

Field name variants; there is a punch of field names that are different when running the formulas on the front (saving the entity manually) and running the formulas on the background (like this case!). If you wish for the formula to work in both cases then variables need to be added to the formulas.

Learn more about variants here: Field name variants Legacy vs REST/CRM2

This won’t update the workflows of the updated entity therefore only 1-to-1 relations are possible to automate with this feature.

Example Case – Relation-type Field Formula

Above we have described how these kinds of workflows can be used to update and copy field values. Next, we show how you can use workflow to run relation-type field formulas. In this example, we create a workflow that ensures that every contact is assigned to the same person who is responsible for the account that the contact belongs to.

To run the formula using workflow, create a new workflow for Contacts.

Next, we give the basic settings to the workflow. In the example, we use Everytime the record is saved option, but Only on the first save -option can also be used. Because we are linking the contact to the account, the condition for this workflow is that the Account name cannot be empty.

Next, we create a task type Run Related Entity Formulas.

image where option run related entity formulas is selected

After the task is created, we give it more details like title, possible delay, etc. This task does not need delay and selecting the Current module -option in Run Formulas For -part sets the task to run formulas for the Contact module after the record is saved.

Now you just save everything and every time the workflow conditions are triggered, the workflow will execute all active formulas in the Contacts module. Naturally, for the workflow, we also need to create a relational field formula that updates the Assigned to -field as desired.

So we create a dynamic field formula in the Contacts module which is run on save and the target is the Assigned To -field.

After the formula is done, just click save and activate. This is also a good time to check that there are no unwanted active dynamic field formulas since the workflow we are creating will run all active formulas for the selected module.

Creating Activities for a User with automation
Scheduling Target Group Activities
Automatically Updating Email Campaigns
Update information to linked and current entity
Combined Shape