locked
newbie needs programming help RRS feed

  • Question

  • hi,

    i have some custom entities that ive set up in CRM2011.

    i wish to be able to access, read and create new ones from a VB.Net app.

    as such i need help...

    - should i go for webservice or SDK???

    - i cant seem to find any sample code to help me connect and create a new custom record programmatically.

     

    any help appreciated.

     

    thnx.

     

     

    Thursday, October 20, 2011 11:23 AM

Answers

All replies

  • Hi Mate,

    Using webservices or sdk does not make any difference. Strongly typed classes are missing in both. You need to use crmsvcutility to generate the strong typed classes for early binding.

    Now download the sdk from http://www.microsoft.com/download/en/details.aspx?id=24004

    There is quick start tutorial there sdk\samplecode\vb\quickstart

    This is console app but it takes cared of everything like authentication, earlybind classes etc.

    If you want all entities in your system including custom fields or entities, you need to replace MyOrganizationCrmSdkTypes.vb.

    To create a new file for your system use

    http://msdn.microsoft.com/en-us/library/ff681561.aspx

    You may find some material in sdk on this too.

    The samplehas all the crud(create,retrieve,update and delete) operation.

    I hope this helps.

     


    Amreek Singh Senior CRM Consultant CDC Praxa Sydney, Australia http://mscrmshop.blogspot.com http://crm2011usersettings.codeplex.com
    • Proposed as answer by Amreek Singh Thursday, October 20, 2011 12:48 PM
    Thursday, October 20, 2011 12:48 PM
  • that, my friend, was a very helpful post - many thanks. im just following it through now and so far it all seems to make sense. one question i have is how do i generate my own version of OptionSets.vb that contains all my own custom values?

     

    thanks again.

    Thursday, October 20, 2011 4:14 PM
  • You can use following sdk project to do that.

    sdk\samplecode\cs\crmsvcutilextensions

    I hope this helps.

    If this answer your question, Could you mark this post as answer.


    Amreek Singh Senior CRM Consultant CDC Praxa Sydney, Australia http://mscrmshop.blogspot.com http://crm2011usersettings.codeplex.com
    • Proposed as answer by Amreek Singh Friday, October 21, 2011 1:06 AM
    • Marked as answer by Bender000 Monday, October 24, 2011 9:08 AM
    Friday, October 21, 2011 1:05 AM
  • sorry for delay in getting back to you. your last post was indeed very helpful and now i can generete optionset data as well - thanks.

    one weird thing i noticed is that when i list the parameters for crmsvcutil.exe at a DOS prompt it doesnt list /codewriterfilter ?! that threw

    me a bit until i realised that een though it didnt list it, it still accepted it.

    anyhow, thanks again for your help.

    Monday, October 24, 2011 9:15 AM