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 :
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)
  • Verified answer
    Alex Fun Wei Jie Profile Picture
    33,628 on at

    i also have same feeling about this, my manager also questioned this before,

    because the fullname is primary field in lead, thus we cant left it blank.

    that's why i created a JavaScript to do that, once user select the existing contact or existing account, the system will auto populate the name.

  • Suggested answer
    sharma.sandeep82 Profile Picture
    743 on at

    Hi,

    You can do the customization as per your requirement that whenever you select any existing contact, then the system automatically fills the First Name and Last Name field.

    --

    Thanks and Regards

    Sandeep

  • Community Member Profile Picture
    on at

    Hi Wei Jie,

    Thanks for your reply.

    Yeah, I think there must be a reason for this small inconvenience.

    Anyway I have already made it work using JS.

    BTW, do you use jQuery on the forms?

  • Suggested answer
    Alex Fun Wei Jie Profile Picture
    33,628 on at

    no,i am using JavaScript to do that

    function getAccount()

    {

    var lookupAccount = new Array();

    lookupAccount = Xrm.Page.data.entity.attributes.get("parentaccountid").getValue()[0].name;

    if (lookupAccount  !=null)

    {

         Xrm.Page.data.entity.attributes.get("companyname").setValue(lookupAccount);

    }

    }

    function GetContact ()

    {

    var LookupContact = new Array();

    LookupContact = Xrm.Page.data.entity.attributes.get("parentcontactid").getValue()[0].name;

    if (LookupContact !=null)

    {

      Xrm.Page.data.entity.attributes.get("lastname").setValue(LookupContact);

    }

    }

  • Community Member Profile Picture
    on at

    Hi Wei Jie,

    Thanks a lot.

  • 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.   

  • 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.

  • 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!

  • 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!

  • 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!!

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 > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans