How can I tell if an entity is disabled in Dynamics CRM 4.0? -


in microsoft dynamics crm 4.0, want able check if record of entity type disabled. think can check statecode. information have seen, value of 0 means entity enabled (editable in crm) , other value means disabled (for editing in crm).

is assumption correct entities?

edit

if assumption correct, possible create queryexpression dynamic entities such comparison, rather using text, "active", incorrect quotes?

from i've read, statecode not same every entity. varies per entity.

i'm not aware of way disable entity. double checked our install, don't see option disable. google yields no results end.

do mean perhaps individual entity records? if so, you'll have check statecode entity you're looking at. think most entities use statecode describe, entities, such activities, seems vary little.

here sql found pull statecode/statuscode details of particular entity:

select      attributename,      attributevalue,     value dbo.stringmap  (dbo.stringmap.attributename = 'statuscode'  or dbo.stringmap.attributename = 'statecode') ,  dbo.stringmap.objecttypecode = 1 

objecttypecode 1 maps account entity.

hope helps.

edit: saw addition. think you'll safe using statecode in instances. use in 1 of projects exclude disabled records on lead , contact entities. double check value mapping i've described , implement.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -