status code meaning

Answered status code meaning

  • Thursday, August 07, 2008 11:38 AM
     
     
    Dear All,

    These are the columns of Lead view on my CRM Database

           [AccountIdDsc]
          ,[AccountIdName]
          ,[AccountIdYomiName]
          ,[CampaignIdDsc]
          ,[CampaignIdName]
    .
    .
    .
    .  

          ,[MobilePhone]
          ,[StateCode]
          ,[Pager]
          ,[StatusCode]
          ,[VersionNumber]
          ,[CFPrangeofemployees]
          ,[CFPrangeofrevenue]
          ,[CampaignId]
          ,[DoNotBulkEMail]
          ,[LastUsedInCampaign]
          ,[DoNotSendMM]
          ,[MasterId]
          ,[Merged]
    .
    .
    .

    what i wanna ask is

    Any body knows, what column should i use for identifying open(active)/closed(inactive)/deleted leads.
    I suspect StatusCode is the column. But then I realize that there are 1 untill 9 code within StatusCode exist. If this true what each of status for ( 1, 2, ....9).

    I have spent hours for this. Sad please help

    Thank before

All Replies

  • Thursday, August 07, 2008 12:20 PM
     
     Answered

    For Active/Inactive, you'll want to reference the StateCode field. The StatusCode field does give statuses (statii?) and those statuses are grouped into the active/inactive states.

     

    To tell if a record has been deleted, you'll want to reference the DeletionStateCode field. If you are querying from the filteredviews, then these are already filtered out. Otherwise, you'll have to query either the regular views (I think), or the base tables, which I don't recommend.

  • Friday, August 08, 2008 1:06 AM
     
     
    Hi Will,

    Thank u for the explanation. So the active and inactive Lead is determinated by StateCode field. What is the value of StateCode field if a Lead is active and What is the value if the lead is inactive.

    Thank you very much.
  • Friday, August 08, 2008 2:21 AM
     
     Answered

    For the statecode field, a value of 0 = Active and 1 = Inactive.

  • Saturday, August 09, 2008 3:55 PM
    Moderator
     
     Answered

    It's typically easier (and supported) to query the filtered view for an entity, as the filtered view definition includes joins to the stringmap table to output the text value for picklist and state fields.

     

    If you query FilteredLead, you will get the statecodename and statuscodename fields