Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 82002

Create a custom entity record on delete step of account record in c# plugin..

$
0
0

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.


Viewing all articles
Browse latest Browse all 82002

Latest Images

Trending Articles



Latest Images