Answered by:
Microsoft Dynamic CRM 2011

Question
-
Hello,
I am new in CRM development. I have developed an c#.Net application that can create Entity, can enter text data into that Entity's attributes. But these all i have done using sdk.
I have instructed to use web service and not sdk.
How can i do that.?
Tuesday, March 27, 2012 6:03 AM
Answers
-
Have you try this?
-
Edit the SoapFromConsoleApp\Service References\CrmSdk\Reference.svcmap\Reference.cs file. Change each instance of "
System.Collections.Generic.KeyValuePair<"
to "KeyValuePair<"
. This will change the reference from System.Collections.Generic.KeyValuePair to the class defined in the XrmExtensionMethods.cs file.
You should find 22 instances.
If you do not see the Reference.cs file, in the Solution Explorer, click the Show All Files button.
I am sure you are missing this part.
Source: http://msdn.microsoft.com/en-us/library/gg594452.aspx
Thanks
Thanks and Regards Blog: http://mubashersharif.blogspot.com
Email: mubasher.sharif@gmail.com
If you find this post helpful then please "Vote as Helpful" and "Mark As Answer".
_____________________________________________________________
Mubasher- Edited by MubasherSharif Tuesday, March 27, 2012 8:47 AM
- Proposed as answer by MubasherSharif Tuesday, March 27, 2012 8:47 AM
- Marked as answer by DynamicsCRM31 Tuesday, March 27, 2012 9:26 AM
Tuesday, March 27, 2012 8:43 AM -
Edit the SoapFromConsoleApp\Service References\CrmSdk\Reference.svcmap\Reference.cs file. Change each instance of "
All replies
-
HI Milan,
You can add a reference to the Organization.svc service, here is a good article to start using this service.
http://danielcai.blogspot.com.ar/2011/06/step-by-step-walkthrough-use-crm-2011.html
Regards,
Damian SinayTuesday, March 27, 2012 6:57 AM -
Hi,
Thanks for reply...
I have taken that example....but its giving me errors.. one of the error like below in XrmExtensionMethod.cs class.
=======================================================
Instance argument: cannot convert from 'SoapFromConsoleApp.CrmSdk.AttributeCollection' to 'System.Collections.Generic.IList<SoapFromConsoleApp.CrmSdk.KeyValuePair<string,object>>' C:\Documents and Settings\milanh\Desktop\CRM Test Example\XrmExtensionMethods.cs 23 17 SoapFromConsoleApp
=======================================================
'SoapFromConsoleApp.CrmSdk.AttributeCollection' does not contain a definition for 'TryGetValue' and the best extension method overload 'SoapFromConsoleApp.CrmSdk.CollectionExtensions.TryGetValue<TKey,TValue>(System.Collections.Generic.IList<SoapFromConsoleApp.CrmSdk.KeyValuePair<TKey,TValue>>, TKey, out TValue)' has some invalid arguments C:\Documents and Settings\milanh\Desktop\CRM Test Example\XrmExtensionMethods.cs 23 17 SoapFromConsoleApp
=======================================================
saying it does not contain definition of TryGetValue and all.
I have taken service reference of my crm server.
whats going wrong??
Tuesday, March 27, 2012 8:31 AM -
Have you try this?
-
Edit the SoapFromConsoleApp\Service References\CrmSdk\Reference.svcmap\Reference.cs file. Change each instance of "
System.Collections.Generic.KeyValuePair<"
to "KeyValuePair<"
. This will change the reference from System.Collections.Generic.KeyValuePair to the class defined in the XrmExtensionMethods.cs file.
You should find 22 instances.
If you do not see the Reference.cs file, in the Solution Explorer, click the Show All Files button.
I am sure you are missing this part.
Source: http://msdn.microsoft.com/en-us/library/gg594452.aspx
Thanks
Thanks and Regards Blog: http://mubashersharif.blogspot.com
Email: mubasher.sharif@gmail.com
If you find this post helpful then please "Vote as Helpful" and "Mark As Answer".
_____________________________________________________________
Mubasher- Edited by MubasherSharif Tuesday, March 27, 2012 8:47 AM
- Proposed as answer by MubasherSharif Tuesday, March 27, 2012 8:47 AM
- Marked as answer by DynamicsCRM31 Tuesday, March 27, 2012 9:26 AM
Tuesday, March 27, 2012 8:43 AM -
Edit the SoapFromConsoleApp\Service References\CrmSdk\Reference.svcmap\Reference.cs file. Change each instance of "
-
Hi,
Thank You Very Much... You helped me a lot in a sense.
Thank You again.
Regards,
Milan Hingu
Tuesday, March 27, 2012 9:26 AM -
Hi,
I want to know more on this now. That if i made a custom entity and custom form in Microsoft Dynamics CRM 2011 server by its UI and now if i want to add data into that custom entity's attributes. Then what will i have to do?
Here we r accessing account entity directly by writing class of it... how to access custom entity ?
Regards, Milan Hingu
Tuesday, March 27, 2012 10:20 AM -
Hi,
E migudiya kai aavde 6e k de thok pu6ya kare 6e?
Reply male to answer ne marked as Answer kar.
Belated Happy BirthDay
Sunday, April 1, 2012 4:30 PM