Plugin C# Code for Retrieve Multiple Concept

using System; using Microsoft.Xrm.Sdk; using Microsoft.Xrm.Sdk.Query; namespace PluginRetrieveMultiple4 { public class PluginRetrieveMultiple : IPlugin { public void Execute(IServiceProvider serviceProvider) { // Obtain the tracing service ITracingService tracingService = (ITracingService)serviceProvider.GetService(typeof(ITracingService)); // Obtain the execution context from the service provider. IPluginExecutionContext context = (IPluginExecutionContext) serviceProvider.GetService(typeof(IPluginExecutionContext)); // ✅ Depth check to avoid infinite loop if (context.Depth > 1) … Read more

Plugin C# Code – Retrieve Example

Created Customer Email and Customer Phone filed in PowerBills(Child Entity)..when ever user select customer filed in power bills it Retrieves fetchs email and phone from the CustomerInformation(Parent Entity). using System; using Microsoft.Xrm.Sdk; using Microsoft.Xrm.Sdk.Query; namespace CustomerInfo { public class CustomerInfo : IPlugin { public void Execute(IServiceProvider serviceProvider) { ITracingService tracingService = (ITracingService)serviceProvider.GetService(typeof(ITracingService)); IPluginExecutionContext context = … Read more

Plugin C# code Get Soure To Set Target – Same Form

using System; using Microsoft.Xrm.Sdk; namespace SourcetoTarget { public class SourcetoTarget : IPlugin { public void Execute(IServiceProvider serviceProvider) { ITracingService tracingService = (ITracingService)serviceProvider.GetService(typeof(ITracingService)); IPluginExecutionContext context = (IPluginExecutionContext) serviceProvider.GetService(typeof(IPluginExecutionContext)); if (context.Depth > 1) { return; } if (context.InputParameters.Contains(“Target”) && context.InputParameters[“Target”] is Entity) { Entity sourceRecordInfo = (Entity)context.InputParameters[“Target”]; IOrganizationServiceFactory serviceFactory = (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory)); IOrganizationService service = serviceFactory.CreateOrganizationService(context.UserId); try { … Read more

Plugin C# Code, SSCMarks – Post Operation, Post Image

using System; using Microsoft.Xrm.Sdk; namespace SSCMarks { public class SscMarks : IPlugin { public void Execute(IServiceProvider serviceProvider) { // Obtain the tracing service ITracingService tracingService = (ITracingService)serviceProvider.GetService(typeof(ITracingService)); // Obtain the execution context from the service provider. IPluginExecutionContext context = (IPluginExecutionContext) serviceProvider.GetService(typeof(IPluginExecutionContext)); if (context.Depth > 1) { return; } // The InputParameters collection contains all the … Read more

Plugin C# code for populatefullname – post image, post operation

using System; using Microsoft.Xrm.Sdk; namespace ASK1025Populatefullname { public class PopulateFullname : IPlugin { public void Execute(IServiceProvider serviceProvider) { // Obtain the tracing service ITracingService tracingService = (ITracingService)serviceProvider.GetService(typeof(ITracingService)); // Obtain the execution context from the service provider. IPluginExecutionContext context = (IPluginExecutionContext) serviceProvider.GetService(typeof(IPluginExecutionContext)); if (context.Depth > 1) { return; } // The InputParameters collection contains all the … Read more

Plugin Code Basic Templet and Steps – #1

Here we are populating fullname based on First Name and Last Name.. Rescource: https://learn.microsoft.com/en-us/power-apps/developer/data-platform/tutorial-write-plug-in 1) create class library2) remane the plugin file name3)copy namespaces (add this dll in references) andclass syntax from microsoft learn replace FollowupPlugin —> your plugin name4)Add microsoft.sdx.dll reference in vs code ..where you downloaded in you laptop path ///— after comeplting … Read more