Tuesday 13 December 2011

CRM 2011 error message Request not supported


I am getting an error message of “Request not supported” when trying to make a soap request in Silverlight application. Following is the code I am using

        EntityReference entityReference = new Xrm.Sdk.EntityReference("userquery",new Guid("{000000-0000-0000-0000-000000000000}"));
           
            ParameterCollection parameterCollection = new ParameterCollection();
            parameterCollection.Add("Target", entityReference);

            OrganizationRequest req = new OrganizationRequest
            {
                RequestName = "RetrieveSharedPrincipalsAndAccessRequest",
                Parameters = parameterCollection
            };

            OrganizationResponse response = _serviceProxy.Execute(req);


Following code works fine if I use early bound types
            
           EntityReference entityReference = new Xrm.Sdk.EntityReference("userquery",new Guid("{00000000-0000-0000-0000-000000000000}"));
            RetrieveSharedPrincipalsAndAccessRequest req = new RetrieveSharedPrincipalsAndAccessRequest();
            req.Target = entityReference;

            OrganizationResponse response = _serviceProxy.Execute(req);


As I am making a soap calls in silverlight utility, later option is not applicable and I am only left with first option to use. 

Solution: I was using the RequestName wrong there should not be any "Request" name appended at the end of it i.e. use RetrieveSharedPrincipalsAndAccess instead of RetrieveSharedPrincipalsAndAccessRequest

1 comment:

  1. i am a successful business owner and father. I got one of these already programmed blank ATM cards that allows me withdraw a maximum of $5,000 daily for 30 days. I am so happy about these cards because I received mine last week and have already used it to get $20,000. Skylink technology is giving out these cards to support people in any kind of financial problem. I must be sincere to you, when i first saw the advert, I believed it to be illegal and a hoax but when I contacted this team, they confirmed to me that although it is illegal, nobody gets caught while using these cards because they have been programmed to disable every communication once inserted into any Automated Teller Machine(ATM). If interested get through to them on mail: skylinktechnes@yahoo.com  or  whatsapp/telegram: +1(213)785-1553  

    ReplyDelete