Personalized Community is here!
Quickly customize your community to find the content you seek.
Have questions on moving to the cloud? Visit the Dynamics 365 Migration Community today! Microsoft’s extensive network of Dynamics AX and Dynamics CRM experts can help.
2021 Release Wave 2Discover the latest updates and new features releasing from October 2021 through March 2022.
2021 release wave 2 plan
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Upcoming TechTalks | All TechTalks
I have CRM 2015 on-prem and we export out leads from CRM and update the status and status reason fields with no problem............until we updated it to the .2 update. Now I am getting errors when changing these fields:
It says that State code is invalid or state code is valid but status code is invalid for a specified state code. 4 is not a valid status code for state code LeadState.Open on lead. Keep in mind we were able to change this BEFORE the .2 update. Is there a way for us to restore this functionality?
Status Reason of 4 is allowed as long as State is 2.
You can find default status and status reason values here:
I am well aware of what the fields should be. Again we were able to edit these, now we are not. I am taking one record and changing the status to Disqualified and Lost as the reason. Disqualified in the Lead entity is a 2 and lost is a 4, but it doesn't matter what I change it to...ie, Cannot Contact (5), No longer Interested (6), it will give me the same error except the status reason number....
Thanks for the reply,
Did you try to use the setstate message to do this programmatically? Perhaps there is something changed in the import routine that is not playing well for you.
No, I am not doing anything programmatically. I was able to do this through an export/import routine.
Is there anyone from Microsoft here that would state what was changed? I am not sure I want to give my end users the ability to do this programmatically, when only the champions of the organizations were the ones who were able to do this.
Just to confirm, when you re-import the values in both the StatusCode and StateCode columns are updated to allowed values?
Unless I'm missing something the answer is right there.If you take a step back and look at the error message in your screenshot, it says:
4 is not a valid status code for state code LeadState.Open
Now if you browse to the url I sent you or use my notes on that same post as reference you will see that according to CRM rules, your data is corrupted.
When state is open (0), status code can only be 1 or 2 and not 4.It sounds obvious or may sounds like something you already know but bear with me.
Status code of 4 means "Lost". You don't expect a lead to be open and lost at the same time - wouldn't make sense. In order to be Lost (4) it must be Disqualified (2). For this reason I have to say that maybe, "they fixed the bug that was allowing you to import invalid data" (just speculation).
Through the drop down at the top of that very same page you can switch version between 2013 to 2016, this shows you those values never changed.
If you open the lead form you will also notice the user interface won't allow you to get to that combination either.
Another thing is the change logs, you can go through update 0.1 and 0.2 change logs by visiting the KB articles found in here. They list a couple of bug fixes for leads but nothing related to your issue:
I believe you have to ask yourself first: do you want or need in your system, "Open Leads" with a "Lost" status? If you don't them go ahead and fix the data before importing it. If you do you may have to apply some customization to your system to work around the OOB behavior and validation.
I hope that helps.
Let me see if I can be ABUNDANTLY detailed as possible. I have a preplan process that the sales reps do that go out to School campuses for their business. Every Semester the pre-plan changes. So the "Leads" I have in the system that they disqualified(2) as lost(4), I have to reimport as a chance for business. So I had my Organizational leaders export out the leads for that school and change the status and status reason and then re-import them in. So in case or scenario they would change the Disqualified to Open and then change the status reason from lost to new.......This simple process worked until version 0.2 of CRM. I went through the changes for both .1 and .2 and did not see anything different as far as imports, I am confused how this got broken. I will leave this open until Wendsday, then I will open a ticket with Microsoft. I hope this cleared up some of the confusion you guys have on what I am doing. I thought I would just ask here first.
Hello to everyone,
We have the Microsoft CRM 2013 On-Premise with the Rollup 4 since 1 month.
Before, on the Rollup 3, we did many times the task to update the status of our Accounts based on some internal rules. To did this we used the Import tool(Exporting the Advanced view to Excel, work with the data and Re-import the file into the system) without any kind of issue.
Now after the update to the Rollup 4, we are not able to do the update of the status for the Accounts, the system give us always the message as the job was successfully completed, however the Account remain Actives.
I want to ask you for your knowledge to help me in how or what I need to do to solve this issue.
Can be a broken link in the database?
Can be some kind of loose rights on the server?
Thanks in advance for your help.
You can find the original post here
Business Applications communities