Skip to main content

Notifications

Announcements

No record found.

Customer Service forum
Suggested answer

Show calculated field based on Account field

Posted on by 180

Hello

I try to add a calculated field to the case/incident table, but I am not able to choose the customer/account/contact relationship.

CustomerId, AccountId and ContactId are not available to choose in the action nor in the condition dropdowns.
pastedimage1679389228224v1.png

How can I add a calculated field to the incident table, based on a field on the account/contact/customer table?

Categories:
  • Suggested answer
    Raphi Profile Picture
    Raphi 180 on at
    RE: Show calculated field based on Account field

    Hi

    I managed to do it with a Quick View and JavaScript (formContext.ui and notification), so there is no need anymore for a calculated field.

    The quick view looks much better as it did in CRM 8.2, so I think we will go with that.

    Thank you anyway.

    Best regards

    Raphael

  • Raphi Profile Picture
    Raphi 180 on at
    RE: Show calculated field based on Account field

    Hi Eiken

    Well I would like to do it otherwise, which means updating the account id from the customer field.

    Maybe a business rule will do the trick if it does not work otherwise.

    So basically what I want to achieve is to have 2 fields on the case form that are already available on the account form (1. field is to determine if the customer is blocked or not, so he gets no support and the 2. field is the customer priority level normal, high or VIP).

    The supporter should then get a message box / pop up which should inform about a VIP/High and blocked customer.

    In CRM 2016/8.2, I managed to do that with two workflows and javascript code (to show the message box). I hoped that there would be a better solution in the meantime, which would be perfectly solved with a calculated field.

    Any idea?

    Thanks!

  • Eiken Profile Picture
    Eiken on at
    RE: Show calculated field based on Account field

    Yes, you can update the custome look up field when you choose an account with a flow or business rule.

    But if your customer has both contacts and account, you need to determine if it is a contact or an account.

    Would you please tell me what you need this calculated field for.

  • Raphi Profile Picture
    Raphi 180 on at
    RE: Show calculated field based on Account field

    Hi again

    As far as I understand, the Customer field is responsible for the mapping from Case to the Account/Contact.

    When I add an additional Lookup field for the account, I have to change the default way the system works or somehow populate the account otherwise, haven't I?

    Or will the field automatically be populated when I choose an account as customer?

    I'd like to keep the system logic as standard as possible. Maybe it would be safer to update the fields with a flow.

    BR

  • Suggested answer
    Eiken Profile Picture
    Eiken on at
    RE: Show calculated field based on Account field

    Hi,

    Only look up field with relationship can be found in that way in calculate field, but the CustomerId's data type is customer,so  it correspond to two entities: Account and Contact.

    pastedimage1679463188018v1.png

    pastedimage1679463212935v2.png

    pastedimage1679464212531v3.png

    This is also the case in the a calculated Yes/No field.

    You can create a lookup field and associate it with the account entity. Then use this filed to edit calculate field.

  • Raphi Profile Picture
    Raphi 180 on at
    RE: Show calculated field based on Account field

    Hello Eiken

    Thank you for the feedback.

    I cannot find the entity "CustomerId" within the calculated field:

    pastedimage1679461535629v1.png

    pastedimage1679461624664v2.png

    In addition, I cannot even access the customer/Account entity from a calculated Yes/No field:
    pastedimage1679461697266v3.png

    Any further idea?

    Thank you.

    BR

    Raphael

  • Suggested answer
    Eiken Profile Picture
    Eiken on at
    RE: Show calculated field based on Account field

    Hi,

    Please refer to the following link to use related entity field.

    Dynamics 365: Use a Field in a Related Entity in a Calculated Field - The Marks Group | Small Business Consulting | CRM Consultancy

    First find the name of lookuo field in Case entity just like this, I find it in relationship, you can also find it in column directly.

    pastedimage1679448781882v2.png

    Then follow the tutorial to enter "primarycontactid", now you can choose them.

    pastedimage1679448737576v1.png

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,773 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,513 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans