Showing results for 
Search instead for 
Did you mean: 
Regular Visitor

By plugins creating records

By plugins creating records

In PP, record each piece of data by writing the Plug-ins, compare the new record with the old record, modify before, modify after, modify the person, modify the time, insert in the model driver, executable event,How to write it, preferably in concrete form,thanks

Regular Visitor

// Obtain the tracing service
ITracingService tracingService =

// Obtain the execution context from the service provider.
IPluginExecutionContext context = (IPluginExecutionContext)

// The InputParameters collection contains all the data passed in the message request.
if (context.InputParameters.Contains("Target") &&
context.InputParameters["Target"] is Entity)
// Obtain the target entity from the input parameters.
Entity entity = (Entity)context.InputParameters["Target"];

// Obtain the organization service reference which you will need for
// web service calls.
IOrganizationServiceFactory serviceFactory =
IOrganizationService service = serviceFactory.CreateOrganizationService(context.UserId);

// Plug-in business logic goes here.

catch (FaultException<OrganizationServiceFault> ex)
throw new InvalidPluginExecutionException("An error occurred in FollowUpPlugin.", ex);

catch (Exception ex)
tracingService.Trace("FollowUpPlugin: {0}", ex.ToString());


code method

Helpful resources

PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.


Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,211)