Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Auto Update Phone Number for custom entity?

Posted on by Microsoft Employee

Hi, I have a custom entity with a relationship to contacts. When the contact changes, I want the "Phone Number" field in my custom entity to be updated with the new phone number of the contact.

Is there a way to do this without JScript? I have been suggested to use calculated fields, but I am not familiar with it. Thank you.

*This post is locked for comments

  • PS Profile Picture
    PS 23,577 on at
    RE: Auto Update Phone Number for custom entity?

    Whats the relationship between contacts and custom entity?

    Is custom entity a lookup on contacts or a subgrid?

  • RalphE Profile Picture
    RalphE 25 on at
    RE: Auto Update Phone Number for custom entity?

    Even if the post is a bit older...

    I would  simply use quick view forms. In case you want to have more information displayed later on you can easily edit the quick view form on the account entity and add the required fields.

    What I don’t get is how this can be done using calculated fields? Could you give me a bit more detailed explanation? i did not get this done.....

    Thanks a lot and best regards,

    Ralph

  • Suggested answer
    Goutham A Profile Picture
    Goutham A on at
    RE: Auto Update Phone Number for custom entity?

    Hi Dave,

    I think workflow is the most easiest and common way of accomplishing your task.

    You can also use calculated fields. For this you have to create phone number in your custom entity as field type=calculated. Then click on edit button and in condition check if the phone number in custom entity is equal to phone number of contact, if no, then update the phone number using set action

    see Weighted revenue of opportunity technet.microsoft.com/.../dn832103.aspx

    Thanks

    Goutham

    <<Please mark as verified if it solves your query>>

  • Suggested answer
    AbiRami Profile Picture
    AbiRami 516 on at
    RE: Auto Update Phone Number for custom entity?

    Hi DaveJH,

    you can achieve this requirement using one of the following methods:

    1) create a workflow, if you are using CRM 2011 it will be asynchronous, this means you will see the result when you refresh the record after a save, in CRM 2013 can be synchronous so you wil see the result after the save.

    2) write a synchronous plugin in C#, you will see the value after you save the record

    3) If you are on CRM 2013, try using Quick View Forms here. Its like a snapshot form created (which can be embedded on another entity form) for a lookup entity. This quickViewForm will be updated with values of current selected record in lookup.

    For reference: mahenderpal.wordpress.com/.../using-quick-view-form-in-ms-crm-2013

    4) Otherwise you can write a JScript function which will be triggered on field's OnChange event. This function will give a webservice call to get other data from the entity record you just selected in lookup.

    For reference: community.dynamics.com/.../odata-with-json-getting-related-values-from-a-lookup-field-in-crm-2011.aspx

    Thanks

  • Suggested answer
    ThomasN Profile Picture
    ThomasN 3,190 on at
    RE: Auto Update Phone Number for custom entity?

    Hi Dave,

    Thanks for reaching out. You can use a workflow for this.

    1. Create New Workflow for the custom Entity
    2. Change Scope from User to full Organization if the workflow should run for anyone who makes the changes.
    3. Check the box to have it run On Create, and When Fields change.
      1. Select the field that holds the contact relationship
    4. Then fill in the logic as needed
    5. The minimum could be Update Record > CustomEntity
    6. Set the Phone Number field = ContactField.ContactsPhoneNumber (or whatever phone number field you want form the contact).
    7. Activate and test.

    Of course there are other ways to configure this but this is most straight forward. This will update the phone number every time the contact field is populated on creation or changed after that.  Let us know if there is more detail needed or verify this answered your question. 

    Have a great day!

    -Tom 

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans