Hi all
I am setting modifiedon when importing historic records with kingswaysoft.
I need to set phonecall etc so it shows on timeline correctly.
I have created a plugin on Create phonecall pre operation -> synchronus.
public void Execute(IServiceProvider serviceProvider)
{
IPluginExecutionContext context = (IPluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext));
Entity entity = (Entity)context.InputParameters["Target"];
if(entity.LogicalName == "phonecall")
{
DateTime modDate = (DateTime)entity["doc_overriddenmodifiedon"];
entity["modifiedon"] = modDate;
}
}
modifiedon is not changing it stays as when the record is created saved, Debug plugun shows it stepping through plugin and changing date.