i want to create a custom entity record when a account record is deleted..
code which i wrote is not showing any error ,
if (context.MessageName == "Delete")
{
IOrganizationServiceFactory serviceFactory1 = (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory));
IOrganizationService service1 = serviceFactory1.CreateOrganizationService(context.UserId);
Entity archieveentity = new Entity("new_archieve");
archieveentity["new_accountnumber"] = "TEST PLUGIN";
service1.Create(archieveentity);
}
If there is something wrong with code ??
Thanks.






