You are here: Reference > statecode and statuscode

statecode and statuscode

Several adapter objects have common fields.

Some objects have a statecode field and a statuscode field. In the Microsoft Dynamics CRM user interface, these relate to Status and Status Reason.

Statuscode values are defined to correspond to a specific statecode value. For example, if a lead has a statecode = 0 (open), it can have a statuscode of 1 (new) or 2 (contacted). If the lead has a statecode = 2 (disqualified), the allowed statuscode values include 4 (lost), 5 (cannot contact), and others.

Dynamics CRMaccepts only statuscodes that are valid for the current or newly assigned statecode. If you change the statecode using the statecode field and you don't set a statuscode, the default statuscode value for the new statecode is assigned.

Review the Field Properties dialog box in the Workbench for a complete list of allowed values for any of the three fields described above. If the statuscode values are customized, the custom values are shown.

Valid statecodes and statuscodes for an object are shown in the picklists associated with the statecode and statuscode fields.

With Dynamics CRM, once a sales order is in a cancelled state, it is considered read-only and can only be updated by a user that is an integration user. For more information, see Using integration mode.

See also

Picklists

Reference