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

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Status and Status Reason

(0) ShareShare
ReportReport
Posted on by

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:

ScreenShot155.gif

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?

*This post is locked for comments

I have the same question (0)
  • Emerson Brito Profile Picture
    180 on at
    RE: Status and Status Reason

    Status Reason of 4 is allowed as long as State is 2.

    You can find default status and status reason values here:

    technet.microsoft.com/.../dn531157(v=crm.7).aspx

  • Community Member Profile Picture
    on at
    RE: Status and Status Reason

    Emerson,

          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,

    Eddie

  • ChrisC Profile Picture
    630 on at
    RE: Status and Status Reason

    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.

  • Community Member Profile Picture
    on at
    RE: Status and Status Reason

    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.

    Thanks,

    Eddie

  • ChrisC Profile Picture
    630 on at
    RE: Status and Status Reason

    Just to confirm, when you re-import the values in both the StatusCode and StateCode columns are updated to allowed values?

  • Emerson Brito Profile Picture
    180 on at
    RE: Status and Status Reason

    Prince,

    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:

    https://support.microsoft.com/en-us/kb/3018363

    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. 

  • Community Member Profile Picture
    on at
    RE: Status and Status Reason

    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.

    Thanks,

    Eddie

  • Victor Parada Profile Picture
    201 on at
    RE: Status and Status Reason

    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

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Community Member Profile Picture

Community Member 2

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#1
UllrSki Profile Picture

UllrSki 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans