Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Auto populating fields

(0) ShareShare
ReportReport
Posted on by 218

Hello,

I have the following scenario:

I have a custom entity ‘Estate Agent’ it has a lookup field to the Account entity to display the estate agents ‘Company name’.

From the Estate Agent entity there is a sub grid with a relationship to the lead entity, new leads can be created directly from the sub grid.

When a new lead is created, there is a field on the lead which displays the related Estate agents name . There is also an Account lookup field on the lead form, what I want to is for this field to be automatically populated with the company name of the related Estate Agent. So e.g. if the estate agent is called Joe Bloggs and he works at ABC Ltd, I want both these fields automatically populated (pulled from the Estate Agent form) onto the lead.

I’m having problems trying to get the estate agents related COMPANY to appear on the lead form, any direction would be useful, preferably not using code if possible.

Thank you

Ladga

  • Ladga Profile Picture
    218 on at
    RE: Auto populating fields

    Hi Abhishek,

    Thank you for your in depth response, I went with approach 2 in the end which worked well.

    Ladga

  • Suggested answer
    abhi_dhoriya Profile Picture
    on at
    RE: Auto populating fields

    Hi Ladga,

     I am presenting couple of alternatives for this situations for general audience to brainstorm. For your case , i belive that approach one is more suitable if no Data Import are involved .

    Always feel free to Add/Update any point if missing 


    Approach 1) Use Data Mapping for 1:N Relationship between your Custom Entity 1(Estate Agent) and Lead

    Pros

    • No Code Solution, works even when creating the Leads and Updating values for Custom Entity 1 Lookup so vice versa.

    Cons

    • Solution Does not work for Data Import or Created from Code.

    0451.2019_2D00_11_2D00_30_5F00_11_2D00_08_2D00_50.png


    Approach 2) Use Business Rules on Lead Form's Custom Entity Lookup Change 1 to Fetch data from Account and update the Values in customer Field.

    Pros

    • Not much Code Solution apart from Business Rule needed

    Cons.

    •  Business Rules mostly works for the Client side, unless specified to run on Server side.
    •  If some one Accidentally Deactivate the Business Rule , solution doesn't work.
    • Solution Does not work for Data Import or Created from Code.


    Approach 3) Use JavaScript on Lead Form's Custom Entity Lookup Change 1 to Fetch data from Account and update the Values in customer Field.

    Pros

    • Less chances of accidental changes once registered .

    Cons.

    • JavaScript works only for the Client side.
    • Fair amount of Coding Involved.
    • Solution Does not work for Data Import or Created from Code.


    Approach 4) Use Workflow on Lead Create/Update and Fetch data from Custom  Entity's Account and update the Values in customer Field.

    Pros

    • No Coding Involved
    • Solution works for Data Import or Created from Code

    Cons.

    • Extensive Coding and Deployment activities are Involved.
    • If some one Accidentally Deactivate the Workflow , solution doesn't work.


    Approach 5) Use Plugins on Lead Create/Update and Fetch data from Custom  Entity's Account and update the Values in customer Field.

    Pros

    • Less chances of accidental changes once registered .
    • Works everywhere, for Data Import, Data Created from Code or any other way.

    Cons.

    • Extensive Coding and Deployment activities are Involved.

    Have a great day ahead !!!

    Thanks,

    Abhishek

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Daivat Vartak (v-9davar) Profile Picture

Daivat Vartak (v-9d... 225 Super User 2025 Season 1

#2
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 106 Most Valuable Professional

#3
Eugen Podkorytov Profile Picture

Eugen Podkorytov 95

Overall leaderboard

Product updates

Dynamics 365 release plans