This is the 3rd blog of this series, before this I have created a blog on the first topic “Perform initial configuration steps” from Module 1 which you can check here : MB2-877 Microsoft Dynamics 365 for Field Service Module 1 Topic – Perform initial configuration steps
In this blog we will cover up the second Topic from the module 1 “Configure product and service pricing“
NOTE : Before we start the module I would strongly suggest you to understand product catalogue in dynamics crm as we will be using price lists, products, unit groups etc alot : https://docs.microsoft.com/en-us/dynamics365/customer-engagement/sales-enterprise/set-up-product-catalog-walkthrough and if you have the knowledge already lets begin:
- Configure product and service pricing features including minimum charge amount, minimum charge duration, and the flat fee option
You can add default “Standard” Price List to your Product in field service, however when you think about “Service” you might want to handle its price list slightly different. In Field service to accomplish this “Field Service Price List” has been added to dynamics CRM:
Once you have configured a price list , you then navigate to “Related” option and click on “Field Service Price List Items”.
( Note that My field service is in Unified Interface so don’t get confused, I am intentionally using field service application – Once you have created a dynamics CRM trial for yourself which should include field service module too, you will see the field service app which you can access :
So, Once your default price list – navigate to the related Field service price list and click on “Add new field service price list”
If you see above I have set Flat Fee, Min Charge Amount & Minimum Charge Duration. Let’s understand what these options are:
Flat Fee – If enabled then the pricing of this item will be not be multiplied by the quantity and also Let’s you decide if a fixed fee for this service applies.
Minimum Charge Duration– If this field has a value , The Min charge will first apply to the minimum duration and beyond the min duration the standard charges will apply in short it will make some amount of time service free.
Minimum Charge Amount – As name suggest these are minimum charges for this service which correlates to the min charge duration.
lets do some math, assume my training per hour charge is 20,000 INR.
now if I apply above field service price list. The requirement is for 5 hours of training. then the math goes like this:
Minimum Charge Duration defined by me is 1 hour. The requirement is 5 hour which means the bill will be for 4 hour which is 4*20,000= 80,000 INR then on this my minimum charge amount will be added which is 10,000 INR. So the final bill will be 90,000 INR.
- Add Products & Services to Incidents
To this, simply navigate to Field service > Incident Type and add incident type. Once you do that; Now When you creating a work order and select incident there – it creates an incident for you which will have the product or service associated. so on a work order you can add product or services via incident.
- Determine when a Product has default Price List and a work order price list.
Here are some quick points to cover up this topic. As we know Price List can be associated to following entities:
- Work Order
- product or service
There there can be a clash in which price list to be used when they combine such as what if work order has a price list & also associated product has a price list too, in that scenario we’ll consider below:
a. The Work Order Price List is used if a product has a different default price list than the Work Order
b. The price of the product will come from the list price on the product if an Item is not on the Work Order Price List
- Associate Products & Services to Price Lists.
Its Quiet easy and straight forward to associated a product or service to a price list. To do this go from Field service navigation > Field service navigation then click on an existing price list or create new as needed.
Open an existing price list or create new one and click on “Price List Items” & click on “+Add New Price List Item”:
Add the Product to it in my case I have added as “Exam preparation” and its Unit in “Hour” which is all defined on the product level and click on Save and Close.
- Define tax code.
You can define tax code within your dynamics CRM field service. Remember you can have different scenarios/requirement to have different – different tax codes.
To define a tax code, click on the dynamics 365 navigation from within field service app and click on field service setting and then on “Tax Codes“:
Click on “Add new tax code”:
Few important points on Tax Codes:
a. Used to define how tax on Work Order charged
b. Tax options for products,
agreements, and services
c. Can be individually defined
for each taxable item
d. A tax code can contain
multiple child tax codes and hence the total tax is defined by the sum of all the children.
I have been planning for this certification since quiet a while now. I am very much attracted towards the field service addition to dynamics CRM hence I decided to finally schedule the exam.
So will be preparing for this exam for next couple of weeks & as I go, I will be creating blogs on my study for this exam. I will try to put as much as details and explanation to understand the concepts.
The blog series will be fully aligned with the exam pattern given on the Microsoft learning page:
Visit this page here : https://www.microsoft.com/en-us/learning/exam-mb2-877.aspx & familiarize yourself with this exam.
What will you get out of this exam?
Well, I should have wrote this question in the beginning of this blog but it is not too late to talk about this now!
If you have a client which very much customer oriented and does a lot field work such as proving services as at home such as Instillation, uninstallation, fix/repair/service of the products that company offers, The field service module of dynamics CRM is perfect for them. Hence you have to have knowledge on this module of dynamics CRM.
I am very much excited to start the series and hope so are you.
In the next and very first blog, We will go through the the first main topic “Perform Initial Configuration Steps” from Set up and Configure Field service module.
So, I will see you in the next blog shortly! Make sure you subscribe to my blogs to get notified on next blogs!
I have recently encountered this issue where in a plugin image was not transferred along with the plugin step in the deployment.
The plugin step was profiled in the source environment and the solution containing it was exported and deployed to other org.
I have a feeling if your plugin is profiled, the image will not be taken to other environment. Obviously it was a miss from the developer but this is something new i saw.
All i did was unregistered the assembly from target environment —> unprofiled the step in source system — >exported the solution again from source — ->deployed the solution to target.
Hope this helps!
Sometimes, you may have a requirement to get the most recently created on record from the entity collection you have retrieved.
Instead of playing around a lot with coding and .net stuff, Dynamics CRM fetch XML and QueryExpression provides a way to sort records Ascending or descending.
Therefore, While retrieving records in FetchXML, do this :
<attribute name='atrributename1' />
<attribute name='atrributename2' />
<attribute name ='attributename3' />
<order attribute='createdon' descending='true' />
<condition attribute='statecode' operator='eq' value='0' />
Or in Query Expression:
QueryExpression qe = new QueryExpression(entityName);
FilterExpression fe = new FilterExpression();
qe.ColumnSet = new ColumnSet(true);
qe.Orders.Add(new OrderExpression(columnname, ordertype));
when Execute them , you will get the desired record on the top which can be access by simply by doing retrievedResult or :
firstRecord= retrievedResult.Entities.First(); //first method.
I hope this helps!
Sometimes we have a requirement to retrieve audit history changes for a particular field in CRM which may be for the purpose of checking if for e.g field A value which is at the moment set to “10”, was ever “5” or may be “3” or may be use old those values of fields to create a new CRM Record. In the below Image , you can easily retrieve old and new values at any given time on birthday field by looping on each audit record:
I have taken the reference from Dynamics CRM SDK & MSDN to figure out how this can be achieved.
Please note : To be able to use this you must have Auditing enabled on all three areas of CRM.
1. Auditing for whole Organization should be already turned on.
2. Auditing for Entity Should be already turned on.
3. Auditing for that Field should already be turned on.
I have accomplished this on a console application , you can do it in plugins or custom workflows as per the requirement.
Assembly: Microsoft.Crm.Sdk.Proxy (in Microsoft.Crm.Sdk.Proxy.dll)
//initiate a new retrieve request & add entity logical name + Guid of the record to retrieve
RetrieveRecordChangeHistoryRequest changeRequest = new RetrieveRecordChangeHistoryRequest();
changeRequest.Target = new EntityReference("contact", Id); RetrieveRecordChangeHistoryResponse changeResponse =
//Execute the request, the "details" variable will have the audit data.
AuditDetailCollection details = changeResponse.AuditDetailCollection;
// Retrieve Particular attribute change history by passing entity logical
//name and guid of the record, finally execute using RetrieveRecordChangeHistoryResponse
var attributeChangeHistoryRequest = new RetrieveAttributeChangeHistoryRequest
Target = new EntityReference("contact", Id),
AttributeLogicalName = "birthday"
var attributeChangeHistoryResponse = (RetrieveAttributeChangeHistoryResponse)_service.Execute(attributeChangeHistoryRequest);
details = attributeChangeHistoryResponse.AuditDetailCollection;
//Details will have many records for example birthday change records, loop through all of them
foreach (var detail in details.AuditDetails)
var detailType = detail.GetType();
if (detailType == typeof(AttributeAuditDetail))
// retrieve old & new value of each action of each audit change from AttributeAuditDetail
var attributeDetail = (AttributeAuditDetail)detail;
foreach (KeyValuePair<string, object> attribute in attributeDetail.NewValue.Attributes)
string oldValue = "(no value)", newValue = "(no value)";
oldValue = attributeDetail.OldValue[attribute.Key].ToString();
newValue = attributeDetail.NewValue[attribute.Key].ToString();
if (oldValue !=null & newValue!=null)
// Do Something here!
catch (Exception ex)
throw new Exception(ex.Message);
I hope this helps!
While importing a solution I got a generic SQL error but when i downloaded the log file i saw below error:
0x80044150 – Object reference not set to an instance of an object
I have seen this error in plugins several times but never in import but root cause and underlying issue remains the same.
The import was trying to find something which was not there in target.
There was a relationship in my solution exist as N:1 to an entity which was deleted from target system way back hence this error occurred. Using the relationship given in solution, CRM was trying to find related entity which wasn’t there.
Hope this helps.
Whenever you open Dynamics CRM , you are presented with a default screen; which you can turn off. However if you have a requirement to put something when users login on the welcome screen i.e Guidelines, Important Links etc., You have multiple ways of achieving this, some are supported and others are unsupported/Not Recommended.
In this blog I am going to quickly share a very simple & supported way of managing Microsoft Dynamics CRM Welcome Screen. I’m using a dashboard to show my desired welcome screen using an HTML web resource. Here is how it looks:
Lets discuss this step by step:
- Disable the out of the box welcome screen, to do this
Goto Click on Main -> Settings -> Administration.Under General Tab, Find Set whether users see welcome screen option. Click No and Ok.
- Create a System Dashboard with just one section in it. If you cant find that one since CRM give you options with mutiple sections. what you can do it “Save as” an existing dashboard , in my case used ” Social Engagement dashboard”
- This dashboard has just one big section which , there’s web resource being used. All we have to do is change its name and also use a new web resource.
- Create a web resource in CRM and select a type as HTML. To Generate a quick HTML i have used this website : https://html-online.com/editor/ Its very nice and easy.
Save your web resource and Publish it.
- Final step is to go to the dashboard > Double click on it and select the webresource section and click on “Edit Component”:
- Now replace webresource section with your HTML web resource. Click Okay and publish all customization.
- Final Step is make this dashboard default for all user. To do this; select the dashboard and click on “Set as Default”:
- Save and publish all customization and you are done. Whenever you or any user open dynamics CRM, will be presented with our custom screen like below:
I hope this helps! Obviously its a solid solution, however in terms of development efforts and Supported item for dynamics CRM, this is one of the best solution.
Meet Jerry, he is wondering about dynamics crm services, In this blog I am helping him to understand when he should use which dynamics CRM web service.
Let’s first understand how many services dynamics crm offers post which will discuss which service to be used when:
- Web API
- Organization Service
- Organization Data Service
- Discovery Service
- Deployment Service
Organization service is basically a SOAP endpoint of dynamics crm and have been available since dynamics crm version 2011. This Service has to be used with .Net Framework and for Business logic that runs in plug-ins or workflow assemblies on the server expect to use the Organization service.( So nothing client side). To work with Organization you have to use microsoft dynamics crm SDK i,e provided libabries and assemblies to interact with dynamics crm.
Organization Data service
Discovery web services
As the name suggest, this service should be used when you have mutiple CRM instances of dynamics crm in single deployment. You would use this service in your plugins ( the server side code) to get the current instance obtain the context.
Deployment web service
This service is barely used by developer as UI options are available. Such as Deployment manager etc. Use this service if you have create , delete or edit a dynamics crm organization/instance. Again its all server side.
I hope this clears your doubt as to when you would use which service and with what programming language.