Microsoft Dynamics CRM 2011 – Publish Customizations

Publishing customizations makes the Web application aware of changes to the data that affects the user interface.

When to Publish Customizations

Customizations are automatically published when new items are created or existing items are deleted.

Note: This is a change from earlier versions of Microsoft Dynamics CRM.

You must publish changes after updating schema metadata or entities that affect the user interface. You can decide to wait and publish a set of related changes together.

Only published customizations are exported with a solution. You should always publish customizations before exporting a solution.

Publishing Programmatically

The following two messages that you can use to publish customizations:

Message: PublishAllXmlRequest
Description: Publishes all customizations.

Message: PublishXmlRequest
Description: Publishes the specified customizations.

When you use the PublishXmlRequest message, you specify which items you want to publish by using the ParameterXml parameter. ParameterXML must comply with the Publish Request Schema.

Retrieving Unpublished Metadata

If you want to create an application to edit customizable items in Microsoft Dynamics CRM, you must retrieve any unpublished definitions of those items. If a developer defines some changes but does not publish them, your application must be able to retrieve them to display them in the user interface.

Use the following two methods to retrieve unpublished metadata

RetrieveAsIfPublished parameter

Retrieves entity, attribute, entity relationship, and option set data by using the following messages:

  • RetrieveAllEntitiesRequest
  • RetrieveAllOptionSetsRequest
  • RetrieveAttributeRequest
  • RetrieveEntityRequest
  • RetrieveOptionSetRequest
  • RetrieveRelationshipRequest

RetrieveUnpublished Request

Retrieves user interface items, such as form, template, visualization and Web resource definitions, by using the following messages:

  • RetrieveUnpublishedRequest
  • RetrieveUnpublishedMultipleRequest

My above blog is based on Microsoft’s Official information.

I hope this blog about ‘Microsoft Dynamics CRM 2011 – Publish Customizations’ was informative. Please feel free to leave your comments.

Post a comment or leave a trackback: Trackback URL.


  • Herbert  On December 11, 2012 at 5:28 AM

    Hi, i have published customizations but somehow the change are not reflected on crm2011 site map unless I do the IISREST or app pool cycled. What could be the issue?

  • Alex Arenas  On April 16, 2013 at 12:54 AM

    I have modifiying an xml webresource inside a pre-operation and post-operation plugins and after that i need to publish those changes, but the code to publish thows an exception. Is it possible to execute publish code inside a plugin? if so, how I can do that?

    Thanks in advance,
    Alex Arenas

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: