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)

Status Reason of Lead

(0) ShareShare
ReportReport
Posted on by 235

Hi There,

After adding some customized items to the "Status Reason of Lead", I noticed that the data type for the "statuscode" column in the LeadBase table is "int". On the screen, it is apprently a list of pair of "value" and "label". It also has three states: open, quilified, and disquilified. I am confused.

1. Could someone explain how the data is stored in the database? Did I look at the right table and column? Is only the "value" stored in the database and the other half of the pair, i.e. "label" stored in the XML? Where is the state information (open, quilified, and disqualified) stored?

2. Why do the numbers not add up? There are 4 status reasons for open state, 1 status reason for quilified state, and 6 stats reasons for disqulified state now on the screen. If I try to add anthor new item, the value shown on the screen will be 14. But, if I check the database table "LeadBase", the maximum value for the "statuscode" column is 9. I cannot add up the numbers.

Thank you very much in advance!

Rho

*This post is locked for comments

I have the same question (0)
  • a33ik Profile Picture
    84,331 Most Valuable Professional on at

     Hi, Rho.

    Labels for picklists and statecodes/statuscodes are stored in StringMap view. It is stored there for Multi-language feature of CRM.

     About increment of identifier it seems that this is by design. May be developers of Microsoft know.

  • Rho CRM Admin Profile Picture
    235 on at

    Hi,

    1. If I understand correctly, a view is just a definition of a SQL query and does not store any real data (data should be stored in tables). Are labels stored in HTML files or stored in the database tables?

    2. Understanding the value increment is important to me because I would like to understand whether I got the right column in the right table within the database. And it will also help me to understand how screen changes affect database data. At this time, I am very interested in how statuscode work on the screen and behinde the screen (i.e. at database level). I do not think state (open, qualified, disqualified) is stored in statecode column because I do not see such values when I query the statecode column in the LeadBase table. From the CRM screen, it seems to me that all three states are using the same picklist (value, label pair). If so, how states (open, qualified, disqualified) come into play? The open, qualified, disqualified must be stored somewhere.

    Please let me know if anybody knows. Thank you very much!

    Rho

  • Inogic Profile Picture
    748 on at

    Hi Rho,

    StringMap is the Table in the CRM database not the View. And it stores the information regarding the Picklists use by the CRM entities.

    By the help of the below Query you can see the Mapped Values of the StatusReason of the Lead entity.

    select * from StringMap where ObjectTypeCode = 4 and AttributeName = 'StatusCode'

    And to increment the Value it gets the Max value from the StringMap table. And for the System Attributes it will start Next number from 200,000 but for the custom attributes it will start from the 1, 2, 3...

    To check more issue about the picklist you can check the following link.

    http://inogic.blogspot.com/2009/11/issues-with-deleting-picklist-option.html

     Thanks!

    Sam

  • Rho CRM Admin Profile Picture
    235 on at

    Hi Sam,

    Well explained. Thank you very much for helping me understand this topic.

    Rho

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 March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
JS-09031509-0 Profile Picture

JS-09031509-0 3

#2
AS-17030037-0 Profile Picture

AS-17030037-0 2

#2
Mark Eckert Profile Picture

Mark Eckert 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans