Geeks With Blogs
Oh my god ... not another MS CRM blog Guenter vs. MSCRM

Since Jeffry van de Vuurst pointed out that there is a supported way to achieve manipulating SiteMap XML, ISV.config, Entity manipulation, etc. (thanks for mentioning it) and I have some time, I will update the little code snippet I posted in a previous post. Please use this version. Additional information can be found in the new SDK 3.0.4 (ISV Programming Guide).

To run this code you have to reference all the helper classes found in the new SDK 3.0.4 in the sdk samples\isvreadiness sub folder.

CrmService service=new CrmService();
service.Url="
http://localhost/mscrmservices/2006/crmservice.asmx";
service.Credentials=System.Net.CredentialCache.DefaultCredentials;
ExportXmlRequest export=new ExportXmlRequest();
export.ParameterXml="<export><entities></entities><nodes><node>sitemap</node></nodes></export>";

ExportXmlResponse entities = (ExportXmlResponse)service.Execute(export);
XmlDocument siteMapXml=new XmlDocument();
siteMapXml.PreserveWhitespace=true;
siteMapXml.LoadXml(entities.ExportXml);
Microsoft.Crm.Sdk.IsvReadiness.SiteMapCustomizer siteMapEditor=
 new Microsoft.Crm.Sdk.IsvReadiness.SiteMapCustomizer(siteMapXml);

Microsoft.Crm.Sdk.IsvReadiness.SupportingItems.SiteMap.SubArea subArea=
 new Microsoft.Crm.Sdk.IsvReadiness.SupportingItems.SiteMap.SubArea();
subArea.Id="nav_sometest";
subArea.Title="Click me for happiness";
subArea.Icon="some.gif";
subArea.Url="/someurl.aspx";

siteMapEditor.AddSubArea("Settings", "Settings", subArea);

ImportXmlRequest import=new ImportXmlRequest();
import.ParameterXml="<import><entities></entities><nodes><node>sitemap</node></nodes></import>";
import.CustomizationXml=siteMapXml.OuterXml;
service.Execute(import);

Please make sure you also add the correct using statements for the web service.

Hf :-)

Posted on Friday, March 31, 2006 10:08 AM | Back to top


Comments on this post: Programmatically change SiteMap XML or any other entity or ISV.config using MS CRM 3.0 web services (supported version)

# re: Programmatically change SiteMap XML or any other entity or ISV.config using MS CRM 3.0 web services (supported version)
Requesting Gravatar...
Its very bad code
Left by iGuullu on Nov 06, 2008 11:29 PM

Your comment:
 (will show your gravatar)


Copyright © Guenter Wallnoefer | Powered by: GeeksWithBlogs.net