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

Announcements

No record found.

News and Announcements icon
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

I have the same question (0)
  • Aric Levin - MVP Profile Picture
    30,190 Moderator on at

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

  • Verified answer
    Abhishek_Sinha Profile Picture
    665 on at

    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,190 Moderator on at

    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.

  • Abhishek_Sinha Profile Picture
    665 on at

    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

  • Shahbaaz Ansari Profile Picture
    6,211 on at

    Thanks abhishek for the help

  • Aric Levin - MVP Profile Picture
    30,190 Moderator on at

    Thank you. Good to know...

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
ScottDurow Profile Picture

ScottDurow 2

#2
GJones Profile Picture

GJones 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans