Change Createdby/Modifiedby Field at Runtime in Dynamics CRM Plugin

By | August 26, 2016

Recently we came across a scenario where we were assigning CreatedBy and ModifiedBy field of the record that was created by plugin dynamically based on the data of the record that was getting created by plugin.

Let us say, my Contact entity that has field “new_createdby”, ”new_modifiedby” and its records are getting created by plugin. In our scenario if user wants to set “createdby/modifiedby” field dynamically based on the new_createdby/new_modifiedby field value while the records get created through plugin, then in that case below code will help you up in assigning createdby/modifiedby for the record dynamically based on the particular field value.

This will help you to change createdby/modifiedby field at runtime in plugin.

Planning to Move to Cloud from Dynamics CRM On-Premises? We can help you!

Leave a Reply

Your email address will not be published. Required fields are marked *