tag:blogger.com,1999:blog-6215355853745600041.post8809862008945191448..comments2023-06-29T06:30:57.142-07:00Comments on A Devotee of Dynamics CRM: CRM 2011 – Get Optionset labels in Silverlight 4 using SOAP endpointsAnkit Shahhttp://www.blogger.com/profile/02231940860065519189noreply@blogger.comBlogger7125tag:blogger.com,1999:blog-6215355853745600041.post-21515515203069161822013-02-07T06:47:35.803-08:002013-02-07T06:47:35.803-08:00Hello,
Sorry for the late response.
Thank you fo...Hello,<br /><br />Sorry for the late response.<br /><br />Thank you for your kind of words. Could you please share your code and explain how did you implement it?Ankit Shahhttps://www.blogger.com/profile/02231940860065519189noreply@blogger.comtag:blogger.com,1999:blog-6215355853745600041.post-28333074588561630932013-02-03T01:51:25.757-08:002013-02-03T01:51:25.757-08:00Hi Ankit,
I have gone through your posts in your b...Hi Ankit,<br />I have gone through your posts in your blogs and it is very helpful to me.<br />Hope you will write more posts which helps other developers.<br />Actually I have simple HelloWorld Webservice which I want to call from CRM 2011.<br />I tried a lot, even gone through Mahender Pal’s post, but nothing is works.<br /><br />Do you have any resource or any step by step article which helps me successfully calling the webservice from CRM.<br /><br />Thanks<br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6215355853745600041.post-19252426063154610922012-01-19T02:43:16.131-08:002012-01-19T02:43:16.131-08:00Thanks Ankit,...it works.
Thanks a lot.
Regards,...Thanks Ankit,...it works.<br /><br />Thanks a lot.<br /><br />Regards,<br />MaheshAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-6215355853745600041.post-33445483283839369882012-01-19T02:10:26.799-08:002012-01-19T02:10:26.799-08:00Hi Mahesh,
Instead of getting out the EntityColle...Hi Mahesh,<br /><br />Instead of getting out the EntityCollection from the response, <br /><br />OptionSetMetadata optionsetmetadata = (EnumAttributeMetadata)(oEntity.Attributes[0].Value)).OptionSet;<br /> <br /><br />use <br /><br />((EnumAttributeMetadata)(response.Results[0].Value)).OptionSet;<br /><br />Because it won't convert the value of entity.attribute[0] in EnumAttributeMetadata. It will convert the value response.result[0] in EnumAttributeMetadata<br /><br />I hope it is clear now.Ankit Shahhttps://www.blogger.com/profile/02231940860065519189noreply@blogger.comtag:blogger.com,1999:blog-6215355853745600041.post-55461905752293302582012-01-19T01:44:39.486-08:002012-01-19T01:44:39.486-08:00Hi Ankit,
See the following code
//Call Back Func...Hi Ankit,<br />See the following code<br /><br />//Call Back Function<br />public void ContactIntrestedStock(IAsyncResult result)<br />{<br />OrganizationResponse responce = ((IOrganizationService)result.AsyncState).EndExecute(result);<br /> EntityCollection results = (EntityCollection)responce["EntityCollection"];<br /><br />foreach (Entity oEntity in results.Entities)<br /> {<br /> OptionSetMetadata optionsetmetadata = (EnumAttributeMetadata)(oEntity.Attributes[0].Value)).OptionSet;<br /> }<br />}<br /><br />The function 'ContactIntrestedStock' is call back function in which i'm trying to get optionset lable.<br /><br />'OptionSetMetadata optionsetmetadata = (EnumAttributeMetadata)(oEntity.Attributes[0].Value)).OptionSet'<br /><br />at this line i'm getting error.<br /><br /><br />Ragards,<br />MaheshAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-6215355853745600041.post-85184299612555068372012-01-19T00:14:23.977-08:002012-01-19T00:14:23.977-08:00Hi Mahesh,
Please share your code.Hi Mahesh,<br /><br />Please share your code.Ankit Shahhttps://www.blogger.com/profile/02231940860065519189noreply@blogger.comtag:blogger.com,1999:blog-6215355853745600041.post-28734830405580195812012-01-18T23:30:40.411-08:002012-01-18T23:30:40.411-08:00Hi Ankit,
I am trying to get lable of optionset v...Hi Ankit,<br /><br />I am trying to get lable of optionset value using above code but i'm getting error "System.InvalidCastException: Unable to cast object of type 'CRMOrganisationService.OptionSetValue' to type 'CRMOrganisationService.EnumAttributeMetadata'"<br /><br />I'm following the same way as you mention in code.Can u tell me how i cast this.<br /><br />Regards,<br />MaheshAnonymousnoreply@blogger.com