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)

Fetching address details when change account

(0) ShareShare
ReportReport
Posted on by

Hi,

I am creating contact details, in which whenever i select account from the lookup, i need to fetch the corresponding address details from account  and populate in the contact address fields. I believe we can do in script as well as plugin. Can you please suggest me how to do this ?

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Rawish Kumar Profile Picture
    13,758 on at

    you can use web api for this.

    i would recommend you to use CRM Rest builder to build your request .

    in below example i am getting values from the user entity , put the script on change of the account lookup.

    rawishblog.wordpress.com/.../get-lookup-value-from-other-entity-and-set-it-on-the-form-using-web-api-in-microsoft-dynamics-crm-2016

  • Suggested answer
    Rawish Kumar Profile Picture
    13,758 on at

    Download : github.com/.../releases

    how to use : github.com/.../CRMRESTBuilder

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at

    Hi ,

    As an alternate you may use quick view form in your account form to display the address information.

  • Suggested answer
    Arpit Shrivastava Profile Picture
    7,518 User Group Leader on at

    Hi Anand,

    Unless you need to store the information on Contact entity, I would recommend to go with Quick View Form to achieve this requirement . Advantages is, you no longer have to duplicate the same fields on the contact entity and map the fields. And can avoid additional customization or writing custom plugin, workflow and Webapi.

    Can check this: https://www.powerobjects.com/2013/09/09/exploring-quick-view-forms-in-crm-2013/


    If found useful, please mark the answer as verified.


    Cheers
    Arpit
    https://arpitmscrmhunt.blogspot.com

     

  • Anandhcrm Profile Picture
    on at

    Thanks for your reply. I works great. but I need the address should be auto populated from wherever i create the contact details. Can you pls suggest me how to do that..

  • Suggested answer
    Rawish Kumar Profile Picture
    13,758 on at

    At the time of creation of contact as well - i supposed you will be filling the account lookup and then will click on "Save".

    In that scenario the method will work too.

  • Anandhcrm Profile Picture
    on at

    If i am creating contact from the account form, this code will not fire isnt it... coz we executing this code in the contact account lookup field only...

  • Verified answer
    Rawish Kumar Profile Picture
    13,758 on at

    yeah at that time i will not work because as soon as click on + button the quick create form opens and account lookup is already filled up. You will have to write a plugin in this scenario on precreate you query the fields from account and set on contact .

  • Suggested answer
    Arpit Shrivastava Profile Picture
    7,518 User Group Leader on at

    Hey Anand,

    Write a plugin to map your account address fields to Contact Address fields. This plugin would need to trigger on Account Address fields update and Contact Account lookup field update.Logic will remain same.

    Hope you get the clarity.

  • Verified answer
    Anandhcrm Profile Picture
    on at

    Thank you

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