public void DeactivateContact(Guid contactId)
{
try
{
SetStateRequest setStateRequest = new SetStateRequest();
setStateRequest.State = new OptionSetValue(0);
setStateRequest.Status = new OptionSetValue(1);
setStateRequest.EntityMoniker = new EntityReference(Contact.EntityLogicalName, contactId);
service.Execute(setStateRequest);
}
catch (Exception exception)
{
throw exception;
}
}
Tuesday, February 28, 2012
Using SetStateRequest to deactivate Contact record.
Recently I wintered to deactivate contact entity for some scenarios. below is the piece of code which I used to do it so.
Subscribe to:
Post Comments (Atom)
MS CRM 2011 KB Article customization Issue.
Recently I have encountered some issue while customizing Kb Article Entity. I was doing following configuration in Article form. 1. Add Ba...
-
Recently I wanted to find out users who are not in the correct time zone in CRM System. To change the time zone or user related settings we ...
-
If you want to take part in the internet as a business, information resource, directory, or as a hobbyist wanting to share data, informatio...
-
Do you need to recover lost files, photos or documents? You're sure that a file was on your hard disk some time ago, but now it seems to...
No comments:
Post a Comment