2001 Wednesday, May 25, 2016 |
Msxrmtools Publisher
Publisher at Msxrmtools

Difference between GAC, Database and Disk deployments in Microsoft Dynamics CRM

MS CRM Notes


Difference between GAC, Database and Disk deployments

GAC Deployment

  • Plugin assebly registered in GAC
  • Plugins do not backed up with database
  • Plugins cannot be added to the solution
  • Plugins needs IISRESET to refresh
  • Does not support Dynamics CRM online
  • You can refer external DLL assemblies used in Plugin only if they are registered in GAC
DB Deployment

  • Plugin uploaded into the database
  • Plugins backed up with database
  • Plugins can be added to the solution
  • Plugins do not need IISRESET to refresh
  • Supports Dynamics CRM online deployment
  • You can refer external DLL assemblies used in Plugin only if they are registered in GAC
Disk deployments

  • Plugin assembly saved on CRM server hard disk
  • Plugins do not backed up with database
  • Plugins cannot be added to the solution
  • Plugins needs IISRESET to refresh
  • Does not support Dynamics CRM online
  • You can refer external DLL assemblies from the disk and from GAC
Note:
  • With ILMerge external referenced assemblies can be merged together to deploy as a single plugin assemly. This will remove the restriction with Dynamics CRM online deployments, but large assemblies are slow to load.
Misconception:
  • You need to deploy plugin dll on the CRM server to enable remote debugging, but this is not required for database deployment, you will need to put pdb file in C:\Program Files\Microsoft Dynamics CRM\Server\bin\assembly folder on crm server.
Benefits of Database Deployment
  • Only database assemblies can be packaged in solutions
  • Zero service interruption to update a database assembly
  • Simplified organization backup / import.
  • Disk assemblies will not support multiple versions
  • All assemblies consolidated into a single place
  • Sandbox and CRM Online only support database assemblies

Msxrmtools.com

Connect To Microsoft Dynamics CRM Using Organization Service Proxy

OrganizationServiceProxy class provides a proxy to connect to Microsoft Dynamics CRM.

Use following constructor to create the proxy.

public OrganizationServiceProxy(
Uri uri,
Uri homeRealmUri,
ClientCredentials clientCredentials,
ClientCredentials deviceCredentials
)
Parameter Description
uri The URI of the organization service.
homeRealmUri

This parameter is set to a non-null value when a second ADFS instance is configured as an identity provider to the ADFS instance that Microsoft Dynamics CRM 2011 has been configured with for claims authentication. The parameter value is the URI of the WS-Trust metadata endpoint of the second ADFS instance.

Pass null in this case

clientCredentials The logon credentials of the client.
deviceCredentials

The Windows Live ID device credentials.

Pass null in this case

Following sample code connects to Microsoft Dynamics CRM using OrganizationServiceProxy

Uri oUri = new Uri("https://yourorg.api.crm5.dynamics.com/XRMServices/2011/Organization.svc");
//** Your client credentials
ClientCredentials clientCredentials = new ClientCredentials();
clientCredentials.UserName.UserName = "YourAccount.onmicrosoft.com";
clientCredentials.UserName.Password = "YourPassword";

//Create your Organization Service Proxy
OrganizationServiceProxy _serviceProxy = new OrganizationServiceProxy( oUri, null, clientCredentials, null);

//** Now simple use Entity and create a sample account
Entity entity = new Entity("account");
entity.Attributes["name"] = "This is my sample account";

//use the service proxy to create the entity object
_serviceProxy.Create(entity);
}

 

Creating a User Adoption Dashboard - Microsoft Dynamics CRM 2011

This video goes through the process of creating a User Adoption Dashboard in Dynamics CRM 2011. The video explains the approach to building a dashboard in CRM 2011 and how the related charts and views make the dashboard present the data that you want.

Quote Management : Quote Status

A Quote can have one of the following status:

  • Draft
    • Initially when quote is created it is in draft state.
    • Quotes must be in a Draft state to be changed.
  • Active
    • When the quote is ready to be presented to a customer, it can be activated.
    • Active quotes become read-only.
  • Revised
    • When a quote is revised, its status value changes back to Draft,
    • and the Revision ID field is automatically incremented.

Flexible Goal Management in Microsoft Dynamics CRM 2011

See how a businesses can define key performance and business indicators to track and measure progress against any organizational goal or metric.

Processes/Workflow Ownership Mystery in Microsoft Dynamics CRM

Under what user’s context does the workflow execute? (If the workflow creates a record, who will be the owner of that new record?)

It depends. Automatically triggered workflows (such as a workflow that triggers on account create) will execute in the context of the owner of the workflow. Therefore, if you have a send email step, the email will be by default sent from the e-mail account of the workflow owner. This is important to consider because the workflow owner might belong to a different business unit and have different privileges than the user who triggered the workflow (e.g. who created the account). Let’s say your workflow creates a task each time an account is created. Depending on the privileges of the user, the task might be in another business unit and not visible to the user, therefore you should consider adding an “assign step” that assigns the new task to the owner of the account. Now, if the workflow is executed on-demand, the workflow will then execute in the context of the user who requests the workflow execution. Because dialogs are always on-demand then they always execute in the context of the user who started the dialog.

Why does the process execute under different users depending on how it was started?

This was a design decision based on security considerations. You don’t want to inadvertently be sending emails and executing actions without knowing it because some other user decided it. Therefore, by having this different behavior we can guarantee that the user under which the workflow executes is always aware that a workflow is performing some actions on his behalf. For the automatic workflow case, the owner of the workflow is also the person who activates it and who selects the trigger mechanism and the workflow steps so it is OK if the workflow executes under that user’s context. For the on-demand case, a user is specifically requesting some actions to be performed on his behalf by a workflow so the user is fully aware of the workflow definition and that it will execute; therefore it is safe to execute the workflow under that user’s context instead of the workflow owner (who might not be aware that a user requests an on-demand execution).

Why can’t I activate/deactivate someone else’s workflow, even if I am the system administrator?

For the same security reason as explained above. You want the workflow owner to explicitly acknowledge that a workflow will be activated and will perform some actions on his behalf. You would not want to allow another user (even the system administrator) to decide that some process should be executed on another user’s behalf. If you want to activate/deactivate someone else’s process you must first assign it to yourself.

If I assign an activated process to another user, why does the user have to re-activate it?

Active processes cannot be modified so the system automatically deactivates them before assigning it to the new user. As per Q3 above, only the new owner will be able to re-activate the process.

I am importing a solution that contains processes and it fails with this error message “The workflow cannot be published or unpublished by someone who is not its owner”. What is wrong?

If your solution contains a process that already exists in the organization and is activated then solution import will attempt to update it. In order to do so, it must first deactivate it. However, if the owner of the activated process is not the same as the user who is importing the solution, then deactivating the process will fail (see Q3). Therefore you have a few options to fix this problem:

  1. Import the solution using the user who owns the activated process. This can be tricky, especially if there are multiple processes owned by different users which need to be updated by the solution import.
  1. Verify which processes are included in the solution, and then find them in the organization, if you can find them and they are not owned by you then you must assign them to yourself. You can reassign them to the original user after you import the solution; however, you will have to ask the process owners to activate it themselves.

Record Type: Quotes

Quotes

  • Represents a proposal or an estimate.
  • Converts to Sales Order.

 

If a customer accepts a presented quote, a sales representative can use Microsoft Dynamics CRM to create an order with the information contained in the Quote record with a single click.

 

Monitor cases in one place on the Dynamics CRM interactive service hub dashboard

Solve customer issues faster with interactive service hub dashboards. Watch this video to see the two main dashboards in action. The Tier 1 dashboard helps you find your cases and the things you need to do fast. Use visual filters, snapshots, and tiles to decide what you want to see and work on. The Tier 2 dashboard gives team leads and managers a single place to monitor more complex or escalated cases. Interactive service hub dashboards give you everything you need to support many customers and issues from one central location.

Record Type: Customer

Within Microsoft Dynamics CRM there are two types of customers:

  • Accounts: Represents Organization or Company
    • Examples: Customers, Vendors, Partners, Reseller.  
  • Contacts: Represents individual Person.

 

Opportunity : Win an Opportunity

To close an opportunity with a status of Won, follow these steps:

  • In the Navigation Bar, click Sales, and in the Sales area, click Opportunities.
  • Select and open an opportunity from the grid and double-click it to open its form.
  • On the Opportunity tab, in the Actions group, click Close as Won.
  • Accept the default values for the Actual Revenue and Close Date fields, and then click OK.
  • Close the Opportunity form by clicking the Close button (x) in the top-right corner

Retrieve Records In Dynamics CRM Using QueryExpression

Following example demonstrates how to retrive records in dynamics crm using QueryExpression.

Connection string

<connectionStrings>
<add name="connection" connectionString="Url=https://org.crm.dynamics.com; Username=user@org.onmicrosoft.com; Password=password;"/>
</connectionStrings>

 C#

using Microsoft.Xrm.Client.Services;
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Query;
using System;

namespace CrmSampleCodes
{
class Program
{
static void Main(string[] args)
{
IOrganizationService _service = new OrganizationService("connection");

// Create query using QueryExpression.
QueryExpression queryExpression = new QueryExpression("account");
queryExpression.ColumnSet = new ColumnSet("name", "address1_city", "emailaddress1");

queryExpression.Criteria.AddCondition("address1_city", ConditionOperator.Equal, "Redmond");

// Query passed to service proxy.
EntityCollection retrieved = _service.RetrieveMultiple(queryExpression);

System.Console.WriteLine("Query Using QueryExpression");
System.Console.WriteLine("===============================");

// Iterate through returned collection.
foreach (var c in retrieved.Entities)
{
System.Console.WriteLine("Name: " + c.Attributes["name"]);

if (c.Attributes.Contains("address1_city"))
System.Console.WriteLine("Address: " + c.Attributes["address1_city"]);

if (c.Attributes.Contains("emailaddress1"))
System.Console.WriteLine("E-mail: " + c.Attributes["emailaddress1"]);
}
System.Console.WriteLine("===============================");
}
}
}

Color Grid for Dynamics 365

Color Form for Dynamics 365