web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

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

(1) ShareShare
ReportReport
Posted on by

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

I have the same question (0)
  • Community Member Profile Picture
    on at

    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
    18,054 on at

    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
    on at

    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
    18,054 on at

    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
    on at

    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
    1,212 on at

    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
    120 on at

    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
    33,628 on at

    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
    on at

    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
    on at

    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

News and Announcements

Season of Giving Solutions is Here!

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
Shidin Haridas Profile Picture

Shidin Haridas 2

#2
Abdullah13 Profile Picture

Abdullah13 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans