locked
CRM 2011 - WebResource Update is not working through SDK RRS feed

  • Question

  • Hi,

    I am having SDK code which creates XML WebResource from XDocument. This code works well for new WebResource Creation however when I try to update existing WebResource it makes no changes to it neither it throws any error in Update Call. Following is code that I am having. 

    Has anybody tried such scenario ?

    int _WebResource_Xml = 4;
                string _name = string.Format("treeview_/XML/{0}.xml", entityName);
    
                Entity e = new Entity("webresource");
                // dataFile: "/webresources/treeview_/XML/Sample_XML_Data.xml",
                e["displayname"] = _name;
                e["description"] = _name + " -- Description";
                e["content"] = getEncodedFileContents(xDOC);
                e["webresourcetype"] = new OptionSetValue(_WebResource_Xml);
    
                Guid _id = CheckIfAvailable(_name, 4, orgSvc);
    
                if (_id != Guid.Empty)
                {
                    e["webresourceid"] = _id;
                    orgSvc.Update(e);
                }
                else
                {
                    e["name"] = _name;
                    Guid id = orgSvc.Create(e);
                }





     


    MaKeer | myencounterwithcrm.wordpress.com | CRM2011 User Settings Utility | CRM2011 Lookup Preview | CRM2011 Lookup Attribute Mapping | CRM2011 TreeView Control (Beta)
    Friday, October 28, 2011 4:57 PM

Answers

All replies