locked
Developer Toolkit unable to generate Organisation Service Context in DCRM2011 RRS feed

  • Question

  • Hi ,

    I am using developertoolkit for CRM 2011 online ,After generating wrapper class i observed that it is not creating Organisation ServiceContext Class in Entities.cs. Is there any another way to use it early binding.If we run crmSvcUtil manually it generate serviceContextName and namespaceName then why developertoolkit creating is not creating ServiceContextName automatically in Entities.cs in DCRM2011 online.


    Prashanth M..J

    Wednesday, July 10, 2013 6:51 AM

All replies

  • Hi,

    I think it's just 'one of those things' - I expect that since you have to give the ServiceContext a name, the developer toolkit simply doesn't cater for asking for it and therefore doesn't generate it. I tend not to use a custom Service Context in Plugins since it's quite simple to use the standard OrganizationServiceContext.CreateQuery<> method:

     var query = (from a in context.CreateQuery<Account>()
    select a);
    


    hth


    Scott Durow
    Blog www.develop1.net    Follow Me
    Rockstar365
    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    Wednesday, July 10, 2013 8:12 AM
    Answerer
  • There is a suggestion on connect to add this feature -> https://connect.microsoft.com/dynamicssuggestions/feedback/details/704521/developer-toolkit-enhance-generate-wrapper-to-produce-a-service-context

    please logon to connect and vote it up.

    Friday, August 23, 2013 3:41 PM
  • i want to use early binding as we have created wrapper class entities.cs using developer toolkit.

     protected void ExecutePreCaseCreate(LocalPluginContext localContext)
            {
                if (localContext == null)
                {
                    throw new ArgumentNullException("localContext");
                }
                IPluginExecutionContext context = localContext.PluginExecutionContext;
                IOrganizationService service = localContext.OrganizationService;

                OrganizationServiceContext ServiceContext = new OrganizationServiceContext(service);

           //here i want to retrive all tasks associated with Case using early binding, how will query using early binding with Linq

    }

    I am facing problem query to  early binding Linq ?

                                          



    Prashanth M..J


    Tuesday, October 14, 2014 1:28 PM