When you are deleting a record in CRM you might have had a requirement to delete it's relationships as well with other records. How would you do this?
Is it Pre Delete message in CRM that would work with this or Post Delete message?
The answer in none of them would work. When the plugin starts executing any of the previous messages then by that time the deleted records would have dropped all the relationships with other records. This means you are no longer able to query the related data.
So is there a way to achieve this, and the answer is Yes, there is.
You can use pre valiation before deletion to be executed and this would do the trick. Please note the message pipeline for this is 10.
You can achieve what we set to achieve from this message when a record is deleted.
This blog describes mostly about the work (CRM 365, CRM 2016, CRM 2015, CRM2011, CRM 4.0, CRM 3.0, C#,Javascript and SQL Server) i do.
Subscribe to:
Post Comments (Atom)
Retrieving Calendar of a Bookable Resource in Dynamics
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...
-
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 ...
-
There are occasions where we need to retrieve working days and working times of a resource in Dynamics grammatically. This is quite possible...
No comments:
Post a Comment