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 :
Microsoft Dynamics CRM (Archived)

Calculated Field Setup

(0) ShareShare
ReportReport
Posted on by

I currently have a workflow running in the background and as an on demand process that fills a field called industry in a contact with the industry of the account that contact is assigned to.  However, if I change the industry of the account, the industry of its contacts do not change.  I thought a workflow would be the solution to this, but it is now my understanding that I need a calculated field to fix this.

 I am somewhat new to CRM and am having trouble creating the calculated field---what should the condition and action be?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    razdynamics Profile Picture
    17,308 User Group Leader on at

    Hi Lauren

    If your Industry is an Optionset then you need to create an Optionset Field on Contact entity of Type Calculated Field, and an Edit button will appear to Configure the Rules for the  Parent record fields to set your contact calculated field to.

    The Edit button next to the Field Type takes you to the calculated field definition editor, where the new calculated field has been created, but no formula has been set. The calculated field definition consists of two sections: CONDITION and ACTION.

    In the Condition section, you can specify an entity, field, operator, type, and value. In the dropdown box for the Entity, you can choose a current entity or a related entity, in your Case the Account. In the Field dropdown box, you have a selection of all available fields for the entity. Depending on the operator you choose, you may need to provide type and value. You can specify multiple conditions using the AND or OR operators.

    You can use data from Lookup records within your Action. You first have to select the Lookup field and then type a period. After that, you can select one of the fields available on the related entity. For example, in the case of <LookupFieldName>.<RelatedFieldName>, you can select: ParentAccountId.Industry.

    Let me know if you need any more help :)

    Best Wishes, Raz

  • Suggested answer
    BJMcmullan Profile Picture
    720 on at

    You could still use a workflow, that kicks off when the Industry on the Account field is changed.  I assume you have a 1:N relationship on accounts to contacts, so you would likely need to use a workflow solution (I personally like the package from Gap Consulting - www.gapconsulting.co.uk/.../workflow-essentials ).  You can then use the Record function to run a One to Many workflow that updates the Industry on the Contact from the Account.  

    Though if it is always synchronized with the account, it may just be easier to add it to a Quick View Form on the Contact from the related account.  That way you can still see it on the account form or Raz's Calculated field would work as well.

  • Community Member Profile Picture
    on at

    Raz,

    Appreciate the help.  When I go to select the entity for the condition, Account is not an option.  How do I fix this?  Thanks.

  • Suggested answer
    razdynamics Profile Picture
    17,308 User Group Leader on at

    Hi Lauren

    Sorry Yes you should know that Calculated and Rollup Fields can Use Lookups to Access Parent Fields, However with the Exception of the Customer Field (ParentCustomerID) which can be either Account or Account. The Customer Field on the Contact is usually used to Identify the Parent Account of the Contcat so this will make it difficult to perform the operations on Contacts.

    One Work around is to Create a Custom lookup to Account on the Contact Entity called new_parentAccount and This wil Automatically Add it to the 1:N Relationship Mapping on the Account: Conntact, allowing this lookup to be used instead of the Customer lookup which has the limitations.

    Then You can Use the new_ParentAccount Field on your Calculated Field, Hope that helps :)

    Best Wishes, Raz

  • Community Member Profile Picture
    on at

    Raz,

    Thanks for the help this is great.  Here is what I have:

    CONDITION

    If [Entity] Parent Account (Account) [Field] Account Industry [Operator] Equals [Value] (My customized values)

    I get an error that says "You can't sort calculated fields that use logical or related record fields.

    ACTION

    Set field value

    [Field] Updated Acct Industry [Type] Field [Entity] Current Entity (Contact) [Field] _____

    It says "No fields available that use a compatible data type.

    What am I doing wrong?  Thanks in advance.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans