How to disable an organisation in Microsft CRM 2011 (MSCRM)

31. March 2011 15:02

With the c# code below you can disable or enable an organisation in Microsoft CRM 2011 by using the Deployment Service:

 

 

EntityInstanceId i = new EntityInstanceId();
i.Id = OrganisationId; //Organisation Id
           
DeploymentService.Organization organization = (DeploymentService.Organization)Provider.deploymentservice.Retrieve(DeploymentEntityType.Organization, i);
               
//Update status to disabled
organization.State = OrganizationState.Disabled;

DeploymentService.UpdateRequest updateRequest = new UpdateRequest();
updateRequest.Entity = organization;

//update status
Provider.deploymentservice.Execute(updateRequest);

 

Tags: ,

Deployment service

Add comment




  Country flag
biuquote
  • Comment
  • Preview
Loading


Result on Demand blog

Welcome to our CRM 2011 blog. As a Microsoft CRM hosting and implementation company, we encounter lots of CRM installation, programming and performane issues. In this blog we share our knowledge and solutions.

Month List


© Resultondemand.nl   Hosting -  Performance -  Upgrade -  Nieuw -  Over ons -  Contact -  CRM 2011 proberen

2AT - Netricity - CRM boeken

Microsoft Partner? Bekijk hier ons partner aanbod