Difference between Retrieve and Retrieve Multiple

Retrieve retrieves a single record given the record ID, the method requires 3 parameters: the entity logicalname, the record ID and the columns (attributes) you want to retrieve. It throws an exception if the record ID is not found.

RetrieveMultiple runs a Query against CRM, normally a QueryExpression is used that defines the entity logicalname, the conditions of the query and the columns (attributes) you want to retrieve. It returns always an EntityCollection object and the Entities property contains the list of the records that satisfy the query conditions, so you can have 0, 1 or n records returned.

Retrieve:

Retrieve retrieves a single record given the record ID, the method requires 3 parameters: the entity logicalname, the record ID and the columns (attributes) you want to retrieve. It throws an exception if the record ID is not found.

For better performance, use this method instead of using the Execute method with the Retrieve message.
Returns the BusinessEntity requested. The BusinessEntity contains only the columns specified by the columnSet parameter. The entity is of the type specified by the entityName parameter.

  1. It is used to retrieve a single entity.
  2. This method is strongly typed.
  3. Retrieves an entity instance using the specified ID.

Parameters :

entityName

Specifies a String containing the name of the entity to retrieve. For more information, see Entity Names.

id

Specifies a Guid containing the ID of the entity to retrieve.

columnSet

Specifies the set of columns to retrieve. Pass null to retrieve only the primary key. To retrieve all columns, pass a new instance of the AllColumns class. See ColumnSetBase.

Return Value

Returns the BusinessEntity requested. The BusinessEntity contains only the columns specified by the columnSet parameter. The entity is of the type specified by the entityName parameter.

 Synatx :

public BusinessEntity Retrieve(

string  entityName,

Guid  id,

ColumnSetBase  columnSet

);

Example :

 // Instantiate an account

object.Entity account = new Entity(“account”);

// Set the required attributes.

For account, only the name is required.

// See the Entity Metadata topic in the SDK documentation to determine

// which attributes must be set for each

entity.account[“name”] = “Fourth Coffee”;

// Create an account record named Fourth Coffee.

_accountId = _service.Create(account);

Console.Write(“{0} {1} created, “, account.LogicalName, account.Attributes[“name”]);

// Create a column set to define which attributes should be

retrieved.ColumnSet attributes = new ColumnSet(new string[] { “name”, “ownerid” });

// Retrieve the account and its name and ownerid

attributes.account = _service.Retrieve(account.LogicalName, _accountId, attributes);

Console.Write(“retrieved, “);

// Update the postal code

attribute.account[“address1_postalcode”] = “98052”;

// The address 2 postal code was set accidentally, so set it to null.account[“address2_postalcode”] = null;

// Shows use of Money.

account[“revenue”] = new Money(5000000);

// Shows use of

boolean.account[“creditonhold”] = false;

// Update the account.

_service.Update(account);Console.WriteLine(“and updated.”);

 RetrieveMultiple :

RetrieveMultiple runs a Query against CRM, normally a QueryExpression is used that defines the entity logicalname, the conditions of the query and the columns (attributes) you want to retrieve.

It returns always an EntityCollection object and the Entities property contains the list of the records that satisfy the query conditions, so you can have 0, 1 or n records returned.

Retrieves a collection of entity instances based on the specified query criteria.

  1. The ColumnSet specified within the QueryExpression can only include the objects of the type of the calling entity.
  2. This method will return the result as a BusinessEntityCollection.
  3. (Multiple records of an a Single entity).Use this method to retrieve one or more entity instances based on criteria specified in the QueryExpression.

Syntax :

public BusinessEntityCollection RetrieveMultiple(

QueryBase  query

);

Parameters

query

Specifies either a QueryExpression or a QueryByAttribute object derived from the QueryBase class. This is the query to be executed for an entity.

The QueryExpression or QueryByAttribute object contains the type information for the entity.

Return Value: A BusinessEntityCollection that is a collection of entities of the type of specified in the query parameter.

 Remarks

Use this method to retrieve one or more entity instances based on criteria specified in the QueryExpression. For better performance, use this method instead of using the Execute method with the RetrieveMultiple message.

To perform this action, the caller must have access rights on the entity instance specified in the request class.

For a list of required privileges, see Retrieve Privileges.

The ColumnSet specified within the QueryExpression can only include the objects of the type of the calling entity.

For more information, see Using ColumnSet.

Example :

 // Create the ColumnSet that indicates the properties to be retrieved.

ColumnSet cols = new ColumnSet();

// Set the properties of the ColumnSet.

cols.Attributes = new string [] {“fullname”, “contactid”};

// Create the ConditionExpression.

ConditionExpression condition = new ConditionExpression();

// Set the condition for the retrieval to be when the contact’s address’ city is Sammamish.

condition.AttributeName = “address1_city”;

condition.Operator = ConditionOperator. Like;

condition.Values = new string [] {“Sammamish”};

// Create the FilterExpression.

FilterExpression filter = new FilterExpression();

// Set the properties of the filter.

filter.FilterOperator = LogicalOperator.And;

filter.Conditions = new ConditionExpression[] {condition};

// Create the QueryExpression object.

QueryExpression query = new QueryExpression();

// Set the properties of the QueryExpression object.

query.EntityName = EntityName.contact.ToString();

query.ColumnSet = cols;

query.Criteria = filter;

// Retrieve the contacts.

BusinessEntityCollection contacts = service.RetrieveMultiple(query);

 Execute Method:

The Execute method executes business logic.

  • It returns a Response object and accepts a parameter as the input of the Request type.
  • You can use this method as a wildcard for all the other methods.
  • This means that you can create an Account by using this method because the class called CreateRequest derives from Request and can be used as the input parameter;
  • you receive a CreateResponse as the result.
  • The same happens for UpdateRequest, UpdateResponse, RetrieveRequest, and RetrieveResponse.
  • The Execute method executes a message that represents either a specialized method or specific business logic.
  •  This method is strongly typed.
  •  It is used to retrieve a single entity.
  • The return types will be a Business Entity.

 Syntax :

 public Response Execute(  Request  Request);

 Parameters :

Request

Specifies a specific Request instance.

Return Value

Returns an instance of a Response. You must cast the return value of the Execute method to the specific instance of the response that corresponds to the Request parameter.

Remarks

To perform this action, the caller must have the necessary privileges to the entity type specified in the request class. The caller must also have access rights on the entity instances specified in the request class.

Example :

 // Set up the CRM

Service.CrmAuthenticationToken token = new CrmAuthenticationToken();

// You can use enums.cs from the SDK\Helpers folder to get the enumeration for Active Directory

authentication.token.AuthenticationType = 0;

token.OrganizationName = “AdventureWorksCycle”;

CrmService service = new CrmService();

service.Url = “http://<servername&gt;:port>/mscrmservices/2007/crmservice.asmx”;

service.CrmAuthenticationTokenValue = token;

service.Credentials = System.Net.CredentialCache.DefaultCredentials;

// Create the request

object.AddItemCampaignRequest add = new AddItemCampaignRequest();

// Set the properties of the request

object.add.CampaignId = campaignId;

add.EntityId = productId;

add.EntityName = EntityName.product;

// Execute the

request.AddItemCampaignResponse added = (AddItemCampaignResponse) service.Execute(add);

Fetch Method

Retrieves entity instances in XML format based on the specified query expressed in the FetchXML query language.

1. Use this method to execute a query expressed in the FetchXML query language
2. Results single or multiple entity
3. This method will return the resultant XML as a string.
4. Not strongly Typed

 Syntax :

public string Fetch(

string  fetchXml

);

Parameters :

fetchXml

Specifies a String that contains the fetch query string to be executed.

Return Value

Returns an XML String type that contains the results of the query.

Remarks

Use this method to execute a query expressed in the FetchXML query language.

To perform this action, the caller must have the Read privilege to the entity types being retrieved and access rights on the entity instances retrieved.

Example :

 // Set up the CRM

Service.CrmAuthenticationToken token = new CrmAuthenticationToken();

// You can use enums.cs from the SDK\Helpers folder to get the enumeration for Active Directory

Authentication.token.AuthenticationType = 0;

token.OrganizationName = “AdventureWorksCycle”;

CrmService service = new CrmService();

service.Url = “http://<servername&gt;:<port>/mscrmservices/2007/crmservice.asmx”;

service.CrmAuthenticationTokenValue = token;

service.Credentials = System.Net.CredentialCache.DefaultCredentials;

// Retrieve all attributes for all accounts.

// Be aware that using all-attributes may adversely affect

// performance and cause unwanted cascading in subsequent

// updates. A best practice is to retrieve the least amount of

// data

required.string fetch1 = @”   <fetch mapping=””logical””>                  <entity name=””account””>                     <all-attributes/>                  </entity>               </fetch>”; // Fetch the results.String result1 = service.Fetch(fetch1); // Retrieve the name and account ID for all accounts where// the account owner’s last name is not Cannon.string fetch2 = @”<fetch mapping=””logical””>                  <entity name=””account””>                     <attribute name=””accountid””/>                     <attribute name=””name””/>                     <link-entity name=””systemuser”” to=””owninguser””>                        <filter type=””and””>                           <condition attribute=””lastname”” operator=””ne”” value=””Cannon””/>                        </filter>                     </link-entity>                  </entity>               </fetch>”;

// Fetch the results.

String result2 = service.Fetch(fetch2);

 Pre-Validate, Pre-Operation, Post-Operation :

In Microsoft Dynamics CRM 2011, plugins can be triggered to fire on a variety of messages (update, create, win etc).

However you can also specify when exactly the plugin will fire in relation to the given message.

Your choice is the following:

Pre-validation of the given message (pre-validation of a record deletion for example).

Pre-operation (pre-operation of a record update for example).

Post-operation (post-operation of a record create).
What trigger point you choose here can be very important, I will attempt to explain here when you should use each type:

Pre-Validation
Pre-Validation plugins run before the actual operation is validated within CRM and could allow the user to do such things as custom checks to determine if a record can be deleted at this point in time.
Basically the Pre-validation should allow your plugin to run outside the SQL transaction, so it runs before the form is validated.

Pre-Operation
Plugins that fire on this message tend to involve operations which could result in the updating of the target record itself before it is actually saved in the system.

The Pre-operation runs after validation and before the values are saved to the database

Post-Operation
Note, avoid using this mode if your plugin is going to be updating the current entity. This mode is best utilized when the plugin simply needs to reference the newly created record (but not actually update it) in order to perform further operations on other records in the system.  Problems can arise if you try to update the target entity in a post-op plugin, for example if you have a plugin that runs post-update of an entity and the same plugin updates the target entity, then an infinite loop will occur.

The Post-Operation operation plugin runs after the values have been inserted/changed in the database.

Event Stage name Stage number Description
Pre-Event Pre-validation 10 Stage in the pipeline for plug-ins that are to execute before the main system operation. Plug-ins registered in this stage may execute outside the database transaction.

Security Note
The pre-validation stage occurs prior to security checks being performed to verify the calling or logged on user has the correct permissions to perform the intended operation.
Pre-Event Pre-operation 20 Stage in the pipeline for plug-ins that are to execute before the main system operation. Plug-ins registered in this stage are executed within the database transaction.
Platform Core Operation MainOperation 30 In-transaction main operation of the system, such as create, update, delete, and so on. No custom plug-ins can be registered in this stage. For internal use only.
Post-Event Post-operation 40 Stage in the pipeline for plug-ins which are to execute after the main operation. Plug-ins registered in this stage are executed within the database transaction.

what is crmsvcutil exe?

Developer Extensions for Microsoft Dynamics CRM 2015 provides an extension to the CrmSvcUtil.exe command-line tool, called the Microsoft.Xrm.Client.CodeGeneration extension. 

Advanced Developer Extensions for Microsoft Dynamics CRM provides a command-line code generation tool called CrmSvcUtil.exe that is used to generate a data context class as well as data transfer objects (DTOs) for all Microsoft Dynamics CRM entities.

We use CrmSvcUtil to generate early bind classes in CRM2011. Also, we have an option to generate Organisation service context. The only problem is that it is a command line tool. We have to go to command prompt, type the command with required parameters and then move the generated file to our project. It is a bit annoying.
How to use CrmSvcUtil tool in Visual Studio. Here are the steps.

  1. In Visual Studio, create a new “Class Library” project as shown in the following screen shot
  2. Delete the class file “class1.cs” created by the Visual Studio.
  1. Add the following files to the project from SDK\Bin folder of CRM SDK.
  • CrmSvcUtil.exe
  • Microsoft.Crm.Sdk.Proxy.dll
  • Microsoft.Xrm.Sdk.dll
  1. Add an  application configuration file to the project and name it “CrmSvcUtil.exe.config”. This file will contain all the parameters we can pass to “CrmSvcUtil.exe”. The solution explorer will look like a following screen.
  2. Here is a list of all the parameters we can use with CrmSvcUtil.
  3. Add the following keys to CrmSvcUtil.exe.config file.

<?xml version=”1.0″ encoding=”utf-8″ ?>

<configuration>

<appSettings>

<add key=”url” value=”https://cdc.crm5.dynamics.com/XRMServices/2011/Organization.svc”/&gt;

<add key=”o” value=”CrmProxy.cs”/>

<add key=”u” value=”username@live.com”/>

<add key=”p” value=”password”/>

<add key=”servicecontextname” value=”XrmContext”/>

</appSettings>

</configuration>

  1. Now the interesting part, right click on project node and press properties.
  2. It will pop up a following dialog box. Click on the “Debug” tab
  3. Select “Start external program” and choose the CrmSvcUtil.exe, we added in step 3.
  4. Now choose the “Working directory” where you want the output file to go.
  5. Debug the code and it will come up with following screen.
  6. You can check the “Output Window” of  Visual Studio for the result. If everything goes smoothly, it will create “CrmProxy.cs” file in the folder selected in “Working directory” in step
  7. Include the “CrmProxy.cs” file into the project.
  8. Check the CrmProxy.cs, it will have all the crm entities classes and “XrmContext”.

Tips

You can add, remove and edit keys in CrmSvcUtil.exe.config to pass parameters to code generator tool.Try accessing the CRM through the browser before debugging, if you are working with CRM Online. You can add this project to any of your crm solution. Change the “Working directory” of the project to generate the CrmProxy file in a desired folder.

Life cycle of plug-in

Event Stage name Stage number Description
Pre-Event Pre-validation 10 Stage in the pipeline for plug-ins that are to execute before the main system operation. Plug-ins registered in this stage may execute outside the database transaction.

Security Note
The pre-validation stage occurs prior to security checks being performed to verify the calling or logged on user has the correct permissions to perform the intended operation.
Pre-Event Pre-operation 20 Stage in the pipeline for plug-ins that are to execute before the main system operation. Plug-ins registered in this stage are executed within the database transaction.
Platform Core Operation MainOperation 30 In-transaction main operation of the system, such as create, update, delete, and so on. No custom plug-ins can be registered in this stage. For internal use only.
Post-Event Post-operation 40 Stage in the pipeline for plug-ins which are to execute after the main operation. Plug-ins registered in this stage are executed within the database transaction.

 Difference between Secure / Unsecure Configuration of Plugin Registration tool 

Unsecure Configuration of

Plugin Registration tool in CRM 2011

Secure Configuration of Plugin

Registration tool in CRM 2011

 

 

Unsecure configuration information could be read by any user in CRM. Remember its public information (Eg: Parameter strings to be used in plugin could be supplied here)

The Secure Configuration information could be read only by CRM Administrators.(Eg: Restricted data from normal user could be supplied here)
Imagine that you include a plugin, plugin steps and activate them in a solution. Later solution was exported as Managed Solution to another environment. In this scenario, the supplied Unsecure configuration values would be available in the new environment.  

Imagine that you include a plugin, plugin steps and activate them in a solution. Later solution was exported as Managed Solution to another environment. In this scenario, the supplied Secure configuration  information would NOT be available in the new environment. The simple  reason behind this is to provide more security to the contents of Secure Configuration.

 What is Metadata?

 Microsoft Dynamics CRM 2015 and Microsoft Dynamics CRM Online uses a metadata driven architecture to provide the flexibility to create custom entities and additional system entity attributes.

All the information necessary for Microsoft Dynamics CRM server to operate is stored in the Microsoft Dynamics CRM metadata. This includes information about entities, attributes, relationships, and option sets.

Metadata object Description
Entity An entity is a container for data, similar to a table in a traditional database. Each entity contains a set of attributes. For Microsoft Dynamics CRM, there are a set of entities that exist when you first install. Some of these are customizable. In addition, you can create custom entities to contain business data.
Attribute An attribute is a container for a piece of data in an entity. Microsoft Dynamics CRM supports a wide variety of attribute types.
Relationship A relationship defines an association between two entities: one-to-many, many-to-one, many-to-many, and self-referential.
Option Set An option set defines a set of options provided for a picklist. Several picklist attributes may use a global option set so that the options they provide are always the same and can be maintained in one location.
Option An option is one of the values available in an option set. Each option in an option set has a unique integer value and an associated set of localized labels.

 Note: Want to know the quickest way to view CRM metadata? This short and sweet blog will show you how you how to you can use the Organization Data service’s $metadata option to generate a quick view of the CRM entities.

Simply navigate to System > Customization > Developer Resources to see the Organization Data service endpoint.

Click on the link and a new window will be displayed.

Append the /$metadata option at the end of the URL and hit Enter.

Registering and Deploying Plug-ins

 Registering and deploying plug-ins can be done using the plug-in registration tool.

  1. Connect to your organization.

If you have access to multiple organizations in the server, choose the one to connect to.

  1. Register a new assembly.
  2. Browse the assembly file, select Isolation Mode and specify where the assembly is stored.
  3. Next you’ll need to select the registered assembly. It can contain multiple plug-ins. Select the plugin you are adding steps to, and register one or more steps.
  4. Fill in the following information for the steps:

Message

Entity

Filtering Attributes if applicable. In above example, the plugin will only trigger for statecode or salesstagecode updates. Selecting the attributes will prevent plugin triggering accidentally or needlessly when unrelated field is updated.

Event Pipeline

Execution Mode

  1. Fill in the Unsecure Configuration/Secure Configuration sections.These sections can be used to pass configuration information to the plug-in, such as user credentials or URLs. The difference between secure and unsecure configuration is as follows:

Secure Configuration does not move with solutions. It has to be re-configured for each environment.

Secure Configuration can be viewed only by CRM administrators.

  1. If applicable, select step and register an image. Choose whether it’s a Pre Image or Post Image.

You’ll also need to select attributes that you would like to be contained within the image.

  1. After the plug-in and the steps have been registered, they can now be included in CRM solutions and deployed with unmanaged or managed solutions.

 DEPLOYING THE PLUGIN

Now you have finished writing the code, it’s time to deploy the plugin in CRM.  Your user will need to be a CRM Administrator.  If you are deploying plugins which are not in sandbox Isolation mode then you will also need to be a Deployment Administrator.

As I am deploying to CRM 2013 online then the plugin has to be only a CRM Administrator because the plugin has to be in sandbox isolation mode.

Right Click on CrmPackage

Press the Deploy button

You will either get an error or it will have worked.  Often when it has worked it will inform you the RegisterFile.crmregister file has changed, this is CRM 2013 Developer Toolkit updating the file with Guid’s for the plugins.

Check the plugin has been registered in the CRM organisation\database by looking at the CRM Explorer and checking in the Plug-in Assemblies section, you should see your new plugin highlighted in green

You can also check by opening your Solution and looking in the plugin assembles section.

Step by step plugin tutorial using Developer’s Toolkit

Install the developer’s toolkit.The Developer toolkit for Microsoft Dynamics CRM 2011 was released as part of UR5 SDK release and is available for download here.

  1. Create a new solution in CRM2011. I named my solution “CRM Plugin Solution”. This is optional but I would recommend you do that.
  2. Open Visual Studio 2010. Select File—New –Project. It will display new project templates dialog as shown in the screen sheet below
  3. Select “Dynamics CRM 2011 Package” project. This is also optional. You can go ahead and select “Dynamics CRM 2011 Plugin Library”, But then you cannot deploy the plugin straight from the Visual Studio. You have to use Plugin Registration tool to register the plugin. Enter the name of project/solution.
  4. VS studio will display following dialog.Enter you CRM 2011 server details.Select the solution name we created in step 1 and click ok
  5. Now right click on the solution and add “Dynamics CRM 2011 Plugin Library” project to the solution. The plugin project will already have a plugin.cs file.
  6. Now sign the plugin assembly. Right click on Plugin Project and select properties. Select Signing tab from left navigation of project property page. On the Signing tab, select the Sign the assembly check box and set the strong name key file of your choice.At a minimum, you must specify a new key file name. Do not protect your key file by using a password.
  7. If you cannot see the “CRM Explorer” window on the upper left side of the VS studio, click on View menu and select “CRM Explorer”.
  8. Now expand “Entities” Node. Right Click the entity on want to create the plugin for and select “Create Plugin”.
  9. It will display a following screen.It is equivalent to “Create Step” screen in plugin registration tool. The dialog will pick up the name of the entity and other information. Choose the message and the pipeline stage. You can also change of the Class attribute. Press Ok.
  10. It will create a .cs file with name mentioned in “Class” attribute in screen shot above. Double click on the class file(PostAccountCreate) and scroll down to following lines of code. You write your business logic here.
  11. protectedvoidExecutePostAccountCreate(LocalPluginContext localContext){      if(localContext ==null)      {          thrownewArgumentNullException(“localContext”);      }      // TODO: Implement your custom Plug-in business logic.

}

  1. The first thing you will do is to get the plugin context, CRMService instance and TracingService instance using localContext passed to the function. All these objects are defined in the built in plugin.cs class.
  2. IPluginExecutionContext context = localContext.PluginExecutionContext;IOrganizationService service = localContext.OrganizationService;

//ITracingService tracingService = localContext.TracingService;

  1. Here is code. It will check if the “account number” is null or empty and  create a task for a user to enter the account number.
  2. protectedvoidExecutePostAccountCreate(LocalPluginContext localContext){       if(localContext ==null)       {           thrownewArgumentNullException(“localContext”);       }           // TODO: Implement your custom Plug-in business logic.       // Obtain the execution context from the service provider.       IPluginExecutionContext context = localContext.PluginExecutionContext;       IOrganizationService service = localContext.OrganizationService;       //ITracingService tracingService = localContext.TracingService;               // The InputParameters collection contains all the data passed in the message request.       if(context.InputParameters.Contains(“Target”)&&       context.InputParameters[“Target”]isEntity)       {           // Obtain the target entity from the input parmameters.           Entity entity =(Entity)context.InputParameters[“Target”];                              //EntityReference pp = entity.GetAttributeValue(“primarycontactid”);           //tracingService.Trace(pp.LogicalName);                                                try           {               //check if the account number exist                   if(entity.Attributes.Contains(“accountnumber”)==false)               {                       //create a task                   Entity task =newEntity(“task”);                   task[“subject”]=”Account number is missing”;                   task[“regardingobjectid”]=newEntityReference(“account”,newGuid(context.OutputParameters[“id”].ToString()));                       //adding attribute using the add function                   // task[“description”] = “Account number is missng for the following account. Please enter the account number”;                   task.Attributes.Add(“description”,”Account number is missng for the following account. Please enter the account number”);                                              // Create the task in Microsoft Dynamics CRM.                   service.Create(task);                       }           }               catch(FaultException ex)           {               thrownewInvalidPluginExecutionException(“An error occurred in the plug-in.”, ex);           }           }

}

I also left few commented lines in the code to show “How to use tracingservice to write in trace log”. You will able to see the trace only if there is an error in the plugin.

  1. Now right click on CRM Package project we created in step 2 and select deploy. It will register the plugin assembly as well as step for the plugin. Click on CRM Explorer to check the deployed plugin as shown in the following screen shot.
  2. Create a new account and test the plugin.

Context.Depth

 Used by the platform for infinite loop prevention. In most cases, this property can be ignored.

Every time a running plug-in or Workflow issues a message request to the Web services that triggers another plug-in or Workflow to execute, the Depth property of the execution context is increased. If the depth property increments to its maximum value within the configured time limit, the platform considers this behavior an infinite loop and further plug-in or Workflow execution is aborted.

The maximum depth (8) and time limit (one hour) are configurable by the Microsoft Dynamics CRM administrator using the PowerShell command Set-CrmSetting. The setting is WorkflowSettings.MaxDepth.

   (or)

 This property is read only.

A plug-in can invoke a Web service call which causes another plug-in to executed, and so on. The system limits depth to a value of eight (8). After a depth of 8, an exception is thrown by the system to avoid an infinite loop.

Used for infinite loop prevention. In most cases, this property can be ignored.

context.Depth   :  It returns integer value.

Example:

  1. User clicks save on a form for an entity which has a plugin registered.  This plugin will have a Depth = 1.  The plugin logic creates an instance of another entity.
  2. The second entity has a plugin registered on the Create event and when fired from the about plugin during the update will get a Depth = 2.  If it was triggering directly from the form it would have a Depth of 1.
  3. Depth is specific to the context but not the message instance triggered.

What is Queue entity in MSCRM?

Queues are containers that hold activities and incidents (cases) in Microsoft Dynamics CRM 4. They make it easier for these entities to be moved around the system, handled and assigned to different individuals within the system.

A queue is a collection of unassigned cases and activities for an organization. You can move activities and incidents (cases) between queues using the Route message. Incidents can also be assigned to a queue by a workflow rule. There are three types of queues:

  • A public queue is created by the business unit to help organize where activities and cases should be routed. The business unit can add queues, delete queues, and update queues.
  • A private queue contains all items assigned to a user that they have not started working on yet. This queue is fixed and the user cannot delete it. Each user has a private queue.
  • A work in progress queue contains all items assigned to a user that they are currently working on. Each user has a work-in-progress queue. This queue is fixed and the user cannot change it.

 Queue is a holding place for work that needs to be done.

  1. Queue can be filled with cases to respond to or activities to complete.
  2. You might also be able to send leads, accounts, contacts or other records to queues.
  3. Queues improve dropping and sharing of work by making cases and activities to be available at some centralized place that everyone can access.
  4. Queue items are either assigned to you or to the team you are member of.
  5. After you select an item only you can work on it until you reset back to the queue or else assign someone else to work on.

 

Leave a comment