December 20, 2006

How to change status of the dynamic entity?

This feature is not well documented, so I decided to describe it here:

//Create a request objectSetStateDynamicEntityRequest stateRequest = newSetStateDynamicEntityRequest();//Use string and not integer value for state. (For Lead use "Qualified" and not 2)stateRequest.State = newState;stateRequest.Status = newStatus;

For a complete list of state and status values take a look in the SDK. You should find an enumeration for every built-in entity state together with allowed status reasons.The name should be State Enumeration (LeadState Enumeration). Custom entities state is "Active" or "Inactive".

Of course you can use strong typed entities: (but I prefer dynamic ones)