Tuesday, 31 March 2015

CRM 2015 - Solutions - Dependency tracking for solution components

How often we have to delete components from a solution and it says ( You can’t delete any solution component that has dependencies on another solution component. )

There we download the file and dig in there for the reason, why not to develop a piece of code to help us on that? Yes, the target in here is more technical, however in any team we will need to have a developer, so ask him. :)

Below the requests that can be called for that purpose.

The following table lists the messages that you can use to retrieve data about solution component dependencies.

Message Description 

RetrieveDependentComponentsRequest 

Returns a list of dependencies for solution components that directly depend on a solution component. 

For example, when you use this message for a global option set solution component, dependency records for solution components representing any option set attributes that reference the global option set solution component are returned. 

When you use this message for the solution component record for the account entity, dependency records for all of the solution components representing attributes, views, and forms used for that entity are returned. 

RetrieveRequiredComponentsRequest 

Returns a list of the dependencies for solution components that another solution component directly depends on. This message provides the reverse of the RetrieveDependentComponentsRequest   message. 

RetrieveDependenciesForDeleteRequest 

Returns a list of all the dependencies for solution components that could prevent deleting a solution component. 

RetrieveDependenciesForUninstallRequest 

Returns a list of all the dependencies for solution components that could prevent uninstalling a managed solution. 

Hope it helps.

Sunday, 29 March 2015

CRM 2015 - Get Ready for the Next Release

 Follow the url to the microsoft web site to check all the information and details.

http://www.microsoft.com/en-us/dynamics/crm-customer-center/get-ready-for-the-next-release.aspx 

In quick bullets, some highlights   :


Dynamics CRM Online 

  • Improved navigation and user interface options : Increase adoption with improved user experience, including new UI themes and faster navigation to records. 

  • Immersive Excel experience : Now you can use Microsoft Excel Online to do quick analysis right from CRM Online. 

  • Excel export completely redesigned . With a single click, you can export to Excel anywhere, including the desktop version of Excel (2007 and later), Excel Online, and other Excel clients. 

  • Embedded OneNote : Capture photos, take voice notes, do free-form drawings, and more. Everything is automatically linked with the record in CRM Online. 

  • Track email by folder : Folder tracking provides a new and intuitive way to track incoming email activities on any device that supports Exchange. Now you can track your email directly from virtually any device. 

  • Social sales : Define rules for creating or updating CRM records from incoming activities. For example, you can now generate leads or opportunities from social posts. 

  • Mobile sales : With the new CRM for Phones app, enjoy the same great mobile experience on your phone as you do on your tablet. Nurture your leads and opportunities through the sales process with the new intuitive interface. 

  • Integrated Parature knowledge base : Empower agents with knowledge base integrated into daily service interactions, including the ability to both search and receive automated suggestions. 

  • Create Office Groups : Collaborate with team members who don't have access to CRM Online with Office Groups. For example, create a group for your sales team, invite other Office 365 users to join the group, and then share documents, email, OneNote notes, and more.


    Hope it helps.

Tuesday, 24 March 2015

Choose your development style for managed code - Create and deploy plug-ins or custom workflow activities

 From MSDN Web Site i took this:

https://msdn.microsoft.com/en-us/library/jj602917.aspx#create_and_deploy_plugins 

The following table lists the choices you have for writing and deploying plug-ins and custom workflow activities. 

  

Tool Description and usage More information 

Plug-in and Custom Workflow Activity classes 

Plug-in Registration Tool 

The plug-in and custom workflow activity classes allow you to create event handlers to perform custom business logic that you can integrate with Microsoft Dynamics CRM to modify or augment the standard behavior of the platform. 

By using these classes directly, your code will not contain any helper code provided in the Developer Toolkit. 

If you write plug-ins and custom workflow activities from scratch, you must use the Plug-in Registration Tool to register them. This tool provides a graphical user interface and supports registering plug-ins and custom workflow activities with Microsoft Dynamics CRM. 

Use this method if you: 

Understand how to use the plug-in and custom activity classes. 

Don't want extra library code auto-generated and placed in your code files. 

Don't mind using an external tool and the web application to register and package custom code assemblies. 

Plug-in development 

Custom workflow activities (workflow assemblies) 

Register and Deploy Plug-Ins 

Walkthrough: Register a plug-in using the plug-in registration tool 


Hop it helps.

Thursday, 19 March 2015

Choose your development style for managed code - Authenticate using code

 From MSDN Web Site i took this few examples for authentication against CRM:


Classes 

Description and usage 

More information 

Helper code 

The classes in the sample code demonstrate how to connect to the web services and authenticate the user. You can use the helper code as a basis of your own custom authentication code. 

This code is easy to use and supports all Microsoft Dynamics CRM deployment types. It also supports storing users’ passwords in the Windows Credential Manager for later reuse. 

Full source code is provided so you can copy and customize it for your needs. This is a recommended practice to isolate your programs from changes to this helper code in future releases. 

Sample: Quick start for Microsoft Dynamics CRM 

Use the sample and helper code 

Helper code: ServerConnection class 

This code can be found in the SampleCodeCSHelperCodeCrmServiceHelpers.cs and SampleCodeVBHelperCodeCrmServiceHelpers.vb files in the SDK.  Download the Microsoft Dynamics CRM SDK package. 

Developer Extensions 

These assemblies are provided to simplify and accelerate the development of applications that interact with Microsoft Dynamics CRM. The extensions extend the functionality of the core Microsoft Dynamics CRM SDK specifically around the use of the  OrganizationServiceContext class. 

For an easy method that does the hard work for you in a few lines of code, use the  CrmConnection  class. 

This code is easy to use and supports all Microsoft Dynamics CRM deployment types. 

Developer extensions for Microsoft Dynamics CRM 

Simplified connection to Microsoft Dynamics CRM 

Xrm client 

For advanced developers who need to customize the Windows Communication Foundation (WCF) service channel management and the authentication process, use the  IServiceManagement  and  OrganizationServiceProxy  classes in the  Microsoft.Xrm.Sdk.Client  namespace. 

Using these classes directly can provide better connection and authentication performance, and more flexibility. However, they require more advanced knowledge of the WCF service channel and server authentication. In addition, you must write more code to handle all Microsoft Dynamics CRM deployment types. 

Active Directory and claims-based authentication 

Sample: Authenticate users with Microsoft Dynamics CRM web services 

Improve Service Channel Allocation Performance 

XRM tooling 

These assemblies leverage the CRM APIs to provide easy authentication support with fewer lines of code and through Windows PowerShell cmdlets. All the function calls in these classes provide thread-safety for actions performed in CRM in a multithreaded environment. It provides a common sign-in control with integrated authentication logic and an ability to securely store and reuse the authentication information to provide a consistent and seamless sign-in experience to CRM from your Windows client applications. 

These classes also provide built-in diagnostic tracing to aid troubleshooting and performance reporting of the action calls from your Windows client applications. 

These classes support all Microsoft Dynamics CRM deployment types and authentication types, except OAuth. 

Build Windows client applications using the XRM tools 

Use XRM tooling to connect to CRM 

Use PowerShell cmdlets for XRM tooling to connect to CRM 

Sample: Quick start for XRM Tooling API 

Hope it helps.

Thursday, 12 March 2015

CRM 2015 - Plugins - Assembly Versioning and Solutions

 How many times after importing a solution with Plugins, we have either errors because of versions, missing steps, the system complaining of something, i think the next few lines will help to understand what happens in the back-end when importing a solution with Plugins (changed code or even less or more steps). 

    

From MSDN        https://msdn.microsoft.com/en-us/library/gg309620.aspx         

    

Plug-in assemblies can be versioned using a number format of major.minor.build.revision defined in the Assembly.info file of the Microsoft Visual Studio project. Depending on what part of the assembly version number is changed in a newer solution, the following behavior applies when an existing solution is updated through import. 

    

The build or revision assembly version number is changed. 

  • This is considered an in-place upgrade. The older version of the assembly is removed when the solution containing the updated assembly is imported. Any pre-existing steps from the older solution are automatically changed to refer to the newer version of the assembly. 

The major or minor assembly version number, except for the build or revision numbers, is changed. 

  • When an updated solution containing the revised assembly is imported, the assembly is considered a completely different assembly than the previous version of that assembly in the existing solution. Plug-in registration steps in the existing solution will continue to refer to the previous version of the assembly. If you want existing plug-in registration steps for the previous assembly to point to the revised assembly, you will need to use the Plug-in Registration tool to manually change the step configuration to refer to the revised assembly type. This should be done before exporting the updated assembly into a solution for later import. 

Hope it helps.

Tuesday, 10 March 2015

Subscribe to SDK assembly updates using NuGet

To be sure that the most up to date versions of the CRM dlls are being used in Visual Studio, the NuGet package manger can be used either from the website or from the Visual Studio.

When a new update rollup is out or a new SDK version is out, not everyone remembers to replace the dlls being used in visual studio to the new ones.

With NuGet in Viisual Studio you can subscribe to SDK assembly updates.

For detailed information please follow url below.

https://msdn.microsoft.com/en-us/library/dn689029.aspx 


Hope it helps.

Friday, 6 March 2015

Tutorials for learning about development for Microsoft Dynamics CRM

How many times we think to ourselves, i need to do something in CRM, but don't know how or don't remember?

Again, from the MSDN found this, and i didn't remember to see this for long time - Walkthroughs

Sometimes the best thing we find is guidelines below some guidelines that can be found in https://msdn.microsoft.com/en-us/library/gg328027.aspx  .


Quick Start

Run a simple program using Microsoft Dynamics CRM web services

App Development

Walkthrough: Register a CRM app with Active Directory

Client Applications

Walkthrough: Use the Modern app SOAP endpoint with JavaScript

Developer Extensions

Walkthrough: Build a console application that connects to Microsoft Dynamics CRM using developer extensions

Developer Extensions

Walkthrough: Build a web application that connects to Microsoft Dynamics CRM using developer extensions

Plugins

Walkthrough: Configure assembly security for an offline plug-in

Plugins

Walkthrough: Register a plug-in using the plug-in registration tool

Plugins

Walkthrough: Register an Azure-aware plug-in with the CRM plug-in registration tool

Microsoft Azure

Walkthrough: Configure CRM for integration with Microsoft Azure

Microsoft Azure

Walkthrough: Configure Microsoft Azure ACS for integration with Microsoft Dynamics CRM 2015


Hope it helps.

Thursday, 5 March 2015

Wednesday, 4 March 2015

CRM 2015 - Programming models for CRM

This one i couldn't miss.


I took this article from MSDN and every single CRM Developer has to know this. Has to know the programming paradigms Early Bound, Late Bound, Rest and WSDL.

Below the full article:

Microsoft Dynamics CRM offers several programming paradigms designed to give you the flexibility to decide what works best for your needs. An early-bound entity data model has been added that includes an "object services" layer that integrates with the stack and exposes entity values as .NET Framework objects. You can also use the late-bound scenario. 


Programmability scenarios 

Early-bound   – Microsoft Dynamics CRM uses an entity data model and Windows Communication Foundation (WCF) Data Services technologies to provide a new set of tools that simplify the development of Internet-enabled applications that interact with Microsoft Dynamics CRM. This also enables an additional programming paradigm: an organization service context that tracks changes to objects and supports .NET Language-Integrated Query (LINQ) queries to retrieve data from Microsoft Dynamics CRM. For more information, see   Use the early bound entity classes in code .

Late-bound   – This programming paradigm lets you write code that accesses entities that are not yet defined. For example, you may use this to write a custom search utility that will work for any installation of Microsoft Dynamics CRM, regardless of the customizations that you made. For more information, see   Use the late bound entity class in code . This paradigm also allows code to be written in a generic manner in such a way that it doesn't require a certain type of entity.

REST   – The REST endpoint for AJAX and Microsoft Silverlight clients provides an alternative interface that you can use to work with Microsoft Dynamics CRM data. Rather than directly invoking the SOAP-based web service, you can execute requests using a service that is based on a URI. For more information, see   Use the OData endpoint with web resources .

WSDL   – This programming paradigm lets you develop code from non-.NET clients, and does not depend on the use of Microsoft Dynamics CRM assemblies. For example, you can use this programming model to write code for Microsoft Dynamics CRM in Java. For more information, see   Write Java and other non-.NET client applications .

Program using early and late binding

Account entity = new Account();entity[ "name" ] = "My Account" ; //loosely typed, late binding entity.AccountNumber = "1234" ; //strongly typed, early binding 



The following diagram illustrates the key programmability scenarios for Microsoft Dynamics CRM 2015 and Microsoft Dynamics CRM Online 2015 Update. 


Use these Microsoft Dynamics CRM programming paradigms for the following: 

In Microsoft Dynamics CRM, you can choose from several programming scenarios to find the model that best suits your needs. 

The main development scenario for Microsoft Dynamics CRM for the Microsoft .NET Framework references two assemblies that allow you to connect to any Microsoft Dynamics CRM system for both early and late bound types. This scenario can be described as late binding or loosely typed. To use late bound types, use the   Entity   class. This class defines a collection of attributes that can be used to get and set the values of attributes. To use this model, the exact logical name must be known (and specified) as a string. 

Alternatively, you can use early bound classes generated directly from the metadata, which include all customizations. The generated classes provide early binding and IntelliSense to aid you as you write custom code. For more information, see   Create early bound entity classes with the code generation tool (CrmSvcUtil.exe) . 

The entity class structure is the following: 

The   DynamicEntity   class has been replaced by the base class   Entity . This means that all types are discoverable at both build time and runtime, making all strongly-typed entities now loosely-typed entities. You can use both programming scenarios in the same code as shown in the following example: 

The Microsoft Dynamics CRM SDK documentation includes samples that use both programming scenarios. The early bound samples use a file of strongly-typed classes that are generated with the code generation utility from a new, uncustomized installation of Microsoft Dynamics CRM. To run the samples, you must generate a file of strongly-typed classes from your installation. You can decide whether to create a proxy assembly from the generated code file or to include the file in your project directly, as we have done for the samples. For more information about your development style choices, see   Choose your development style for managed code . 


Link to the article in MSDN:

https://msdn.microsoft.com/en-us/library/gg327971.aspx 


Hope it helps.

CRM 365 Cloud - Disassociate 2 records using typescript

In case you need to Disassociate 2 records, please find below the code that allows you to do that.      export async function DissociateE...