Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

State code or Status Code is invalid when Qualifying lead

Posted on by Microsoft Employee

I am building a solution in my test environment and I am getting the State code of Status code is invalid when trying to qualify a lead. I have removed the 'In Process' (1) status reason on the opportunity which is what I thought was the issue because when I change the status on the Lead from 'New' (1) to Contacted (2) the process works. Further I have the same set up in production and I am not getting the error.

 

<Message>System.ArgumentException: 1 is not a valid status code on opportunity with Id bdbc6000-681f-e511-b3f7-0050569e1c91.

I tried to add a new status reason on the opportunity and then in SQL I changed the attributevalue from 100000002 to 1 in the stringmapbase table, I also adjusted the statusmapbase table and the filterstringmap table, but when I publish all of these revert to 100000002.

Is there a way to further find the issue and resolve it?

 

Thank you,

Mike

 

 

*This post is locked for comments

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: State code or Status Code is invalid when Qualifying lead

    Remove the mapping of status reason between the lead and any other entity (Account, Contact, and Opportuniy) 

  • Verified answer
    PS Profile Picture
    PS 23,577 on at
    RE: State code or Status Code is invalid when Qualifying lead

    Add a status reason to your opportunity and enter 1 as the value.

    Why did you delete it, thats causing this problem...

    Have you tried this www.iotap.com/.../crm-picklist-and-the-stringmap-table-crm-4-0-

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: State code or Status Code is invalid when Qualifying lead

    Try to disqualify the lead first. Then reactivate and then qualify.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans