Microsoft Dynamics CRM Publish Entities Customization using C# code PublishXmlRequest
This post is to demonstrate that you can publish entity customization with the help of C# code. In one of the project which I was working on faced the issue of publishing entity customization from web client. I was getting generic SQL error "SQL timeout error".
It was very hard to publish the changes from web client and deliverable were also impacted. I searched over the internet and found that we can publish the changes using C# code without facing any issue.
Sample code
_serviceProxy.Execute(new PublishXmlRequest
{
ParameterXml = @"
<importexportxml>
<entities>
<entity>systemuser</entity>
<entity>lead</entity>
</entities>
</importexportxml>"
});
Create Organisation service object and initialise it with your CRM org. Pass the Entities name which you want the changes to be published and execute this code from console application. This will work like charm.
This solved my problem and hope it helps you as well.
Happy CRMing!
Comments
Post a Comment