Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How can i change Lead status to "Qualify" without qualifying Lead

(0) ShareShare
ReportReport
Posted on by 6,211

Hi All,

How can i change Lead status to "Qualify" without qualifying Lead in Dynamic 365. I want this because i have Opportunity already created and i want to link that opportunity with the lead without qualifying it.

Thanks,

Shahbaaz

*This post is locked for comments

  • Aric Levin - MVP Profile Picture
    30,188 Moderator on at
    RE: How can i change Lead status to "Qualify" without qualifying Lead

    Thank you. Good to know...

  • Shahbaaz Ansari Profile Picture
    6,211 on at
    RE: How can i change Lead status to "Qualify" without qualifying Lead

    Thanks abhishek for the help

  • Abhishek_Sinha Profile Picture
    665 on at
    RE: How can i change Lead status to "Qualify" without qualifying Lead

    Hi Aric,

    I have not verified the above code, but it's from msdn blog and they have listed that opportunity will not be created.

    Thanks,

    Abhishek

  • Aric Levin - MVP Profile Picture
    30,188 Moderator on at
    RE: How can i change Lead status to "Qualify" without qualifying Lead

    The issue with the above, is that is will qualify the lead and create the opportunity, which is not what Shahbaaz is looking for.

    You should try the following, but try it first in a different environment:

    EntityReference moniker = new EntityReference();

    moniker.LogicalName = "lead";

    moniker.Id = leadId;

    SetStateRequest request = new SetStateRequest();

    request.EntityMoniker = moniker;

    request.State = new OptionSetValue(1); // Qualified

    request.Status = new OptionSetValue(3); // Qualified

    try

    {

      SetStateResponse response = (SetStateResponse)service.Execute(request);

    }

    catch (FaultException<OrganizationServiceFault> ex)

    {

      string errMessage = ex.Message;

      throw new InvalidPluginExecutionException(errMessage);

    }

    Hope this helps.

  • Verified answer
    Abhishek_Sinha Profile Picture
    665 on at
    RE: How can i change Lead status to "Qualify" without qualifying Lead

    Hi,

    Please check below code and url.

    / Qualify the first lead, creating an account and a contact from it, but

    // not creating an opportunity.

    var qualifyIntoAccountContactReq = new QualifyLeadRequest

    {

       CreateAccount = true,

       CreateContact = true,

       LeadId = new EntityReference(Lead.EntityLogicalName, _lead1Id),

       Status = new OptionSetValue((int)lead_statuscode.Qualified)

    };

    var qualifyIntoAccountContactRes =

       (QualifyLeadResponse)_serviceProxy.Execute(qualifyIntoAccountContactReq);

    Console.WriteLine("  The first lead was qualified.");

    msdn.microsoft.com/.../microsoft.crm.sdk.messages.qualifyleadrequest.aspx

  • Aric Levin - MVP Profile Picture
    30,188 Moderator on at
    RE: How can i change Lead status to "Qualify" without qualifying Lead

    Hi,

    I don't think that there is any way of doing this with the UI.

    You might be able to do this with code and change the State Code and Status code values. The question is, would that trigger  the execution of the Qualify event. Have to check, can't confirm...

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

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

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 54

#3
dkrishna Profile Picture

dkrishna 6

Featured topics

Product updates

Dynamics 365 release plans