Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

First Name and Last Name for existing Contacts when creating a lead

(1) ShareShare
ReportReport
Posted on by Microsoft Employee

Does anyone know for Dynamics CRM Online Update 1, why we need to enter First Name and Last Name when you are creating a Lead even for existing Contacts?

I just don't understand why we have to enter the duplicate information, I thought it should be working like if you choose the existing contact for the new lead, the first name and last name should be auto populated. I remember somewhere I saw someone said CRM needs Full name for reporting service, but I just don't get it.

Anyone with any thoughts? Thanks.

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: First Name and Last Name for existing Contacts when creating a lead

    Hello Kokulan, thank you for your quick response.

    Below REST code is the code that i have written to Autpopulate But in this code except emailaddress1, parentcustomerid field is not autpopulating please can you help me through this..!!!

    //code//

                Xrm.Page.data.entity.attributes.get("telephone1").setValue(contact.Telephone1);

               Xrm.Page.data.entity.attributes.get("mobilephone").setValue(contact.MobilePhone);

               Xrm.Page.data.entity.attributes.get("emailaddress1").setValue(contact.emailaddress1); //Not Populating//

               Xrm.Page.data.entity.attributes.get("parentaccountid").setValue(contact.parentcustomerid); //Not Populating//

  • Kokulan Profile Picture
    Kokulan 18,050 on at
    RE: First Name and Last Name for existing Contacts when creating a lead

    If you already have the SDK Rest populating other fields, and not email, could you share the bit of code that does this we might be able to make that work instead of introducing new query method

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: First Name and Last Name for existing Contacts when creating a lead

    Hello Kokulan,

    Thank you for your Quick Response please help me how do i write a Jscript query, I have already written SDK Rest for autpopulaton but still emailaddress field is not working so please suggest some simple JavaScript code so that i ca utilize and please help to insert a query or web API's because I am new to the Dynamics CRM.

  • Suggested answer
    Kokulan Profile Picture
    Kokulan 18,050 on at
    RE: First Name and Last Name for existing Contacts when creating a lead

    If you are ok with these fields getting populated when you save the Lead, you can create a real-time workflow that triggers on create of the lead and populates these fields from the existing contact

    If you want these to be populated on the form as soon as the existing contact is selected and before the lead is saved, you will have to use javascript to query and get the field values from the selected existing contact and set the values.

    You can use Web API to get the values and populate them on lead

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: First Name and Last Name for existing Contacts when creating a lead

    Hello Wei,

    I have scenario that is from the lead form, the existing contact from business process, I need a basic fields that is firstname, lastname, businessphone and emailaddress should be autopopulated by selecting existing contact in lead form.

    please help me!!

  • Karuna Karan Profile Picture
    Karuna Karan 1,210 on at
    RE: First Name and Last Name for existing Contacts when creating a lead

    You can achieve this without code as well, by using both Business Rules and WF (sync).

    1. Create a Biz Rule - If Existing Contact doesn't contain data or contains data then set Lname = 'Lname'. (This will allow you to create the Lead with dummy data). Then later you will fill the Existing Contact lookup (assuming) and save the Lead.

    2. Create a Synchronous WF that triggers on record Create & Field change 'Existing Contact'. Which then has steps to check if Existing Contact lookup contains data, set the Fname & Lname of Lead from the Existing Contact.

    Hope this helps!

  • R.Seiffert Profile Picture
    R.Seiffert 120 on at
    RE: First Name and Last Name for existing Contacts when creating a lead

    Hi Wei,

    I Need a bit of clarification.

    I want to set the Firstname and lastname of an existing contact when i choose it on the BPF Field.

    So that when i pick the Contact from the "Existing User" lookup it automatically fills the Firstname and Lastname Fields in the summary. I understand the Syntax of your Script, but where do you trigger it? My Problem ist: There is no way to set the OnChange Event on BPF Fields, becuase they don't belong to the used form of the Lead-Entity.

    Maybe you can help me.

    Thanks and greetings from Germany!

  • Alex Fun Wei Jie Profile Picture
    Alex Fun Wei Jie 33,626 on at
    RE: First Name and Last Name for existing Contacts when creating a lead

    Hi Ray,

    1. No possible,  because the fields must be same type. Eg:  Lookup to Lookup .

    2. yes, you are able to do that, but first you must set the primary field to null able . and the system only populate the name to the field after user click save.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: First Name and Last Name for existing Contacts when creating a lead

    Thanks for the Javascript that is awesome!   Couple of newbie questions here:

    1. Is it possible to use the business rules to get the values from the related contact and then set them on the lead "last name" and "first name" properties?
    2. Can you use the Synchronous process/workflow to set the "last name", "first name" using dynamics value from the related contact?  

    I am basically looking for ways to empower the power users to use built in features vs having to ad Jscript.   

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: First Name and Last Name for existing Contacts when creating a lead

    Hi Wei Jie,

    Thanks a lot.

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 Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,979 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,848 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans