Quick tip – Get lookup record attributes using calculated fields

Let’s look at an example. In my opportunity form, there is an account lookup field. Sales manager requests that he needs to see the primary contact number of the account so that he can make the call from opportunity form.

We can easily do this using calculated fields in dynamics.

Step 1 – Add a new calculated field to opportunity

Select data type as “Phone”. You can use any type of data depending on the related record field that you need to show on the form.

Select “Calculated” from the “Calculated or rollup” dropdown. This will save the entity and open the calculation in another window.

Step 2 – Update calculation

Click on “Action” and simply what you have to do is follow below syntax:

<lookup field name>.<attribute name>

In this case, our lookup is parentaccountid and we can select the primary phone number from dropdown (Main Phone).

Save the calculation and it should look something like below. Now save and close the window.

Let’s add this new field to the opportunity form

Here is the result:

Sometimes, you may need to get fields from multiple entities in order to provide all necessary information to your users within one form. Calculated field is a powerful tool that enables you to access data across all related entities.

If carefully designed, you can implement complicated business logic using calculated fields.

Happy Learning!



Categories: Dynamics 365

Tags:

1 reply

Trackbacks

  1. Use business rules in dynamics to populate fields – PowerPlatform Solutions

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: