Where is CrmOrganizationServiceContext for CRM 2016 (8.x) SDK? - dynamics-crm

I'm migrating code from SDK for Dynamics CRM 2015 to the latest version which is for 2016 and 365. However, I have noticed that the generated XrmServiceContext is inheriting from Microsoft.Xrm.Sdk.Client.OrganizationServiceContext instead of Microsoft.Xrm.Client.CrmOrganizationServiceContext. That removed the automatic lazy loading of related entities on CrmOrganizationServiceContext. I wasted hours trying to find out why the related entities were empty while the code compiles correctly. I have found that the Microsoft.Xrm.Client has been removed from the 8.x SDK. Does anyone know if the CrmOrganizationServiceContext have been moved/renamed to something else or it was simply removed? Is there alternatives for that lazy loading support? Don't want to find all the places related entities are directly used and add a LoadProperty to it. Thanks.

Related

Kendo UI and MSCRM Online version 9.0.x not comaptible?

Anyone know if Kendo UI has known problems working in MSCRM Online version 9.0.2? Any word from Telerik about a fix/update? Thanks!!
Our custom MSCRM solution is working fine with MSCRM Online version 8.2.x, but not working with version 9.0.x. Testing appears to indicate problems with loss of Global context items and likely related to ClientGlobalContext.js.aspx.
I noticed a post about what sounds similar (link below).
Web Resource in Dynamics 365—Kendo UI destroyed by jQuery loaded by ClientGlobalContext.js.aspx
CRM 9.0.x introduces (and recommends) new ways of retrieving the FormContext. A lot of the old methods including Xrm.Page are being deprecated.
Here's the list of deprecated methods on MSDN
Instead of Xrm.Page you have to pass the execution context in when you configure your form scripts: Here's the MSDN article
There is a JavaScript analyser in the XRM Toolbox that can be used to identify scripts that contain deprecated code

Telerik Data Access generate classes automatically

Until the recent release I was happily using Telerik Data Access in a database first way:
Created the database schema in external DB designer
Generated a fluent model in Visual Studio
Whenever I did a database change I either re-ran the generation or updated models via visual designer depending on the magnitude of the change
After the last release the templates I used for the generation are gone (as is the visual designer) and any attempt at Googling the solution takes me to a Telerik documentation page saying the info is deprecated.
I'm working with large existing databases (100+ tables) and there's no way I'm coding the models by hand.
What are the current options for auto generating the models?
I got a reply on Telerik forums. Simply said there's nothing I can do now and have to wait til/if they develop a solution. For all that are interested, please vote on the feature request.
Here's the reply:
Thank you for your feedback.
We have already created a new feature request (http://feedback.telerik.com/Project/114/Feedback/Details/163155-generation-of-fluent-models-with-data-access-q2-2015-and-higher) to create a code generating tool to create your fluent models based on your database schema. You are welcome to cast your support vote for the item.
I cannot give you any time frame when we will be able to ship such tool, but I will make sure to notify you as soon as we have a public release.
Regards,
Viktor Zhivkov
Telerik
The feature is still not available. But maybe this is an alternative to being stuck with VisualStudio 2013.
Owners of VisualStudio Enterprise have another option. They can modify the code generation templates and generate the fluent metadata and context code from an UML class diagram.
I invested in checking the MSDN documentation and created a VS extension which I open-sourced.
Please check https://github.com/bdongus/UMLExtensions for details. Feel free contribute.

WCF Service and LightSwitch using Telerik OpenAccess ORM - editing doesn't work, claims "Specified entity is not managed by a context"

I stumbled upon an issue after following the steps described in http://documentation.telerik.com/openaccess-orm/quick-start-scenarios/getting-started-root-quickstart-vs-light-switch-wcf-ria . I can generate the Model and the Service just fine and adding the DataSource to the Lightswitch project also proceeds without a problem.
If I afterwards create a Desktop client with a screen based on the OpenAccess Service, I can filter and view the data properly, but any attempt at editing or deleting existing records results in an error message stating "Specified entity is not managed by a context". Adding new records works alright (and the newly added records exhibit the same symptoms).
I'm working in Visual Studio 2013 and followed the steps from the Quick Start guide. Is there something I'm missing here? Did anybody succeed at getting a LightSwitch-editable Service from OpenAccess or is it some sort of a known issue that's not stated anywhere explicitly?
I posted the same question on the Telerik Forum and they admitted that they could reproduce this error but could not find any workaround at the moment. They added the issue to their Lighswitch integration roadmap but the timeframe for the fix is yet unknown.
I solved the problem replacing Telerik OpencAccess ORM with classic WCF RIA Service solution (according to the tutorial: http://www.c-sharpcorner.com/UploadFile/raj1979/how-to-use-wcf-ria-service-in-lightswitch-2012/ ). I also had to switch to Visual Studio 2012 to be able to create a Domain Service Class.
Summing up, I had to change some tools but everything works perfectly now.

CRM 2011 Online Plugin Uploader to support CI

I'm involved in developing a sandboxed Microsoft Dynamics CRM 2011 Online plugin and have a set of tests that I can drive from a xUnit front end on my local machine given that I right-click the Package and select the Deploy option (and resort to using the plugin loader sample when that doesn't work).
I'd like to be able to automate the running of my tests on my CI rig, where I'll need it to upload a fresh binary as part of each run.
We've looked at http://pluginregcrm2011.codeplex.com/ but it has bugs that prevent it working for Online and in short looks like it's no longer being maintained and I'm not keen to take ownership of what should be a fundamental tool that a platform/ecosystem should just have.
Is anyone using that tool or another plugin uploader non-interactively? Am I missing something?
I know I'm late with my answer and I`m pretty sure that you already have found a solution which is working for you.
However I felt the same pain and I have hacked a small application which could be used to simply update the plugin assembly, without doing any configuration work.
PluginAssemblyLoader -f "C:\MyPlugin.dll" -c "Url=http://crmserver/org;"
Please see http://msdyncrm-contrib.github.io/PluginAssemblyLoader
There isn't an easy OOB experience with this but the CRM 2011 Developer Toolkit just uses a set of MSBuild targets that you can call yourself. It's just MSBuild, so you could hook it into your CI build if required. If you install or just extract the Developer Toolkit MSI in the SDK you'll find the following two files in there...
Microsoft.CrmdeveloperTools.CrmClient.dll
Microsoft.CrmdeveloperTools.CrmClient.targets
As an aside it would be nice if MS would open source this as the current implementation uses predominantly sealed and internal classes within the custom tasks.

Add Web Service Reference Weird Problem in WP7

I have a WP7 project in VS2010 pro/ultimate and I have added a web reference from another project on the same solution. The web service project is just a normal website project, I just created .ASMX file. I tested the service using web browser and it works fine.
The problem is, after I added this service as service reference, I cannot reference it in my WP7 project and I can't view it in Object Browser either as if it doesn't exist.
I use local URL like 'http://localhost:12345/WebService.asmx' when I added the service, VS can see all the methods and can add successfully. Very strange for me and I don't know how to solve this issue.
Anyone can give me any clue on this? Thanks very much.
I've had a similar issues before- on one machine, a restart was required, on another, I had to uninstall ALL of my SL stuff, then uninstall Vstudio, then reinstall and reapply any SL add-ons.
Then it worked fine.
Also had a friend with the same issue- uninstall all, then reinstall worked for him also.
I believe these were machines with pre-rtm SL and Phone bits on them.
I've had a similar problem. I created a WP7 project using VB.Net. I built a WCF Class web service, a client side proxy class, and then a WP7 application with the service reference. When I added the service reference, the code generating utility would not build the required Reference.svcmap file detail (it only created the header information). However the project would still compile, yet I couldn't reference the service in code as it didn't exist in the underlying files.
I tried recreating the WP7 project in C# and everything worked. My guess is that the VB implementation of WP7 might still have some issues, however that is a guess only. I'm keen to see if anyone else has had the same issue specific to the VB WP7 template or if it is something else.
I bumped into the same problem, but it was fixed after a reboot as suggested in this thread by dethSwatch.
I do remember that a silverlight SDK update was installed a bit earlier, maybe the reboot is required after the update?
I think this issue might be related to the January Update to the WP7 tools. I managed to fix this issue by installing the VS10-KB2486994-x86.exe fix found on the above page. That sorted the issue I had with generating a client side proxy for the WCF service I wanted to call. Hope this helps.

Resources