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 :
Customer experience | Sales, Customer Insights,...
Answered

How to pre-populate Field value to another field from one entity to another?

(0) ShareShare
ReportReport
Posted on by 285

Can anyone recommend the best solution on how to populate field data value from another field? 

For instance, the lead address state/province has value "ON", then related account or any other entity state/province value is pre-populated to ON as well.

I have the same question (0)
  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    You can write JavaScript using Xrm.WebApi to get the data from parent entity and using attribute's manipulation to set the data. Check following articles that could be helpful:

    docs.microsoft.com/.../xrm-webapi

    docs.microsoft.com/.../clientapi-form-context

    docs.microsoft.com/.../attributes

  • nidnani Profile Picture
    285 on at

    Hi, Andrew thanks for the quick response. Can you provide an example of this?

    I am still learning and an example will really help. I also subscribed to your YT channel in case you can make a video of it.

  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    You can check this - www.briteglobal.com/.../

  • nidnani Profile Picture
    285 on at

    Thanks Andrew i will take a look.

    Also, could you please suggest any resource where i can learn CRM Development. I am not very familar with it.

  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    You can start here - docs.microsoft.com/.../

  • nidnani Profile Picture
    285 on at

    Hey Andrew, thanks for providing the link. I'll start learning that.

    Also, I want to lock the form once all the values are saved with an exception on the field. 

    How can I do that? Should I be using JS web resources? If so can you guide how to use it and what to add? 

  • a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Generally speaking - yes, to lock the form down you can use JavaScript. What I'm not sure about is what do you mean with "exception on the field".

  • nidnani Profile Picture
    285 on at

    The form is integrated with other company, so whenever its saved then within few minutes an order number is sent from the other company and we consume that value. The number is mapped to Name field of the form.

    And i would like to lock the form so no one can change values.

  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Then use JavaScript in order to achieve your goal - stackoverflow.com/.../disabling-all-fields-on-a-form-in-crm-2015

  • Verified answer
    Wahaj Rashid Profile Picture
    11,321 on at

    Hi,

    You can also use Relationship Mapping to populate fields from Parent to Child Entities.

    For instance, when you qualify a Lead, data is copied to created account and contact automatically (Address State as well).

    In your scenario, Lead address is being copied to related account and contact.

    You can add or update fields to the mapping, for instance for populating a filed value on Contact from Originating Lead:

    • Go to System Settings -> Customization -> Customize this System.
    • Expand Entities, select Lead Entity.
    • Click on 1:N Relationships.
    • Double-click on Lead - Contact relationship.

    pastedimage1595435827005v1.png

    • Now you see existing fields mapped, and you can also add new:

    pastedimage1595435890874v2.png

    Please note, this only works when you create a child record form Parent records form.

    For more advanced scenarios,as suggested by others, you can use flows, workflows and plugins.

    Best,

    Wahaj  

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 > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 108 Super User 2025 Season 2

#2
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 49 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans