Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Answered

Auto populating fields

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
    Ladga 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
    abhi_dhoriya 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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans