Is it possible to publish a Dynamics CRM Theme programatically ? I've tried setting the "isdefaulttheme" flag to true but this causes an exception.
I can't see an SDK message to do it - but it can be done from the CRM UI so there must be a way somehow :-)
You are looking for the PublishThemeRequest.
PublishThemeRequest request = new PublishThemeRequest();
request.Target = new EntityReference(Theme.EntityLogicalName, defTheme.Id);
service.Execute(request);