status code meaning
-
Thursday, August 07, 2008 11:38 AMDear 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.
please help
Thank before
All Replies
-
Thursday, August 07, 2008 12:20 PM
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.
- Marked As Answer by Donna EdwardsMVP, Owner Saturday, May 30, 2009 8:19 PM
-
Friday, August 08, 2008 1:06 AMHi 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
For the statecode field, a value of 0 = Active and 1 = Inactive.
- Marked As Answer by Donna EdwardsMVP, Owner Saturday, May 30, 2009 8:19 PM
-
Saturday, August 09, 2008 3:55 PMModerator
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
- Marked As Answer by Donna EdwardsMVP, Owner Saturday, May 30, 2009 8:19 PM