Thursday, May 18, 2017
When we export a solution in CRM it always asks for some settings to be exported from the system and often most would ignore this and would export the components that needs to be exported. When there are any system wide setting changes that need to be changed a system administrator would go and do this manually.
This is sometimes bit of a pain as if you miss any of this there would be possibility of the system not working as it supposed to do.
Luckily Microsoft is giving the option to include them with your solution and this has been there from a long time. However not all of the system settings can be exported, but a lot can be done. The following technet article describes what can be exported.
Try using this feature if you haven’t the next time when you want to include system settings with the solution.
Sunday, May 14, 2017
In the previous blog I mentioned that this cannot be done as the fields doesn’t get displayed via the Kingsway tool. There is nothing wrong with it when you think about the scenario as the modified-on field should actually be set to the time a record has been modified in CRM. This would be set to the time when the record is updated via the web services.
However in most of the data migration the client needs asks the data migration team to set the modified on time to the last updated time of the record in their previous system. This is more important to them than the actual created on time of the record in the previous system.
Now the problem would be we cannot set this to modified-on time in CRM via the tool. We can set this time to the created on time via the tool and most of the client would be agreeing to it (Please note when you do this you cannot set the actual created on time of the record). Also please note that you have to set the updated on date to overridecreatedon field in the Kingsway soft tool. (You should be having a security role which has permission to update this field)
But some clients are adamant that they want to see the same date time value in the modified on time. This can be achieved by a simple plugin.
The plugin has to be registered in the pre create of the entity that you are migrating the data to. It should be having the following code. After this is set your modified on time would be set to the actual updated time from the previous system. I was greatly helped by the following blog post to get an idea about this.
if (context.InputParameters.Contains("Target") && context.InputParameters["Target"] is Entity)
//get the entity from the input parameters
Entity entity = (Entity)context.InputParameters["Target"];
if (entity.Attributes.Contains("createdon") && entity["createdon"] != null)
//assign the modifiedon time to the created time for dm
entity["modifiedon"] = entity["createdon"];
There are occasions where we need to retrieve working days and working times of a resource in Dynamics grammatically. This is quite possible...
There is a bit of change in CRM 2011 than CRM 4. The code is below. Microsoft.Xrm.Sdk. EntityReference Moniker1 = new Microsoft.Xrm.S...
Error message “User does not have send-as privilege.” when sending emails programmatically in CRM 2011We were working on sending emails programmatically using CRM and all were working fine. Suddenly we got this error when we tried to send an ...
When you create a new security role from scratch and then assign only that role to a system user and when you log to the CRM site you might ...