web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Blogs / TheMarkChristie / Dynamics 365 Calculated Fie...

Dynamics 365 Calculated Fields and Parent Entities

TheMarkChristie Profile Picture TheMarkChristie 10,328 Moderator

Where have you been all my life?????      Ahh you have been there the whole time i have just missed you.

So today i was looking at some requirements to pull information from the parent entity as part of a calculated field. I needed to take Created On Date from the Child Record and add the Number of Contract days from the Parent to give a Must Respond Date.

And this actually is as simple as it sounds i have just been missing it the whole time!!!!

Call-Back-Days.png

  • You can access parental fields via the Lookup field to the parent entity, such as <LookupFieldName>.<FieldName>. This is not possible with multi-entity Lookup fields like Customer which can be Account or Contact. However, some entities have individual Lookup fields for a specific entity, such as ParentAccountid.<FieldName> or ParentContactid.<FieldName>.

  • Sorting is disabled on:

    • A calculated field that contains a field of a parent record.

    • A calculated field that contains a logical field (for example, address field).

    • A calculated field that contains another calculated field.

  • Calculated fields can span two entities only.

    • A calculated field can contain a field from another entity (spanning two entities – current entity and parent record).

    • A calculated field can’t contain a calculated field from another entity that also contains another field from a different entity (spanning three entities):
      (Current Entity)Calculated Field <- (Parent Record) Calculated Field 1 <- (Parent Record) Calculated Field 2.

Comments

*This post is locked for comments

  • Community Member Profile Picture Community Member
    Posted at

    I have used this technique successfully for one field, a boolean ("2 value") field.  However, it does not work when I try it for a Whole Number field, format=Time Zone, from the same parent entity.  Unlike for the boolean field, there is no nice little UI form boxes to fill in, so instead I tried selecting the Parent lookup field, which worked fine. And when I typed period, a drop down of available fields is displayed - super! :) However, the required Whole Number, Time Zone field is not on that list! :(  Any idea why some fields are missing?

    So, I tried just typing the required Parent field-name in after the Parent lookup field and period-character but CRM rejects that with the following error: "The formula contains an invalid reference: parentprofileid.my_timezone." :(

    I can use a QuickView to work around this problem but would like to know if there is a Microsoft bug here or what is going on.

  • ahmed Safarini Profile Picture ahmed Safarini 40
    Posted at

    Good Stuff .. thank you Mark :)