Personalized Community is here!
Quickly customize your community to find the content you seek.
Microsoft Customer Co-creation
Help impact how the tools and services you rely on are developed. Microsoft Customer Co-creation connects you directly with our engineers so you can provide feedback before a single line of code is written. Interested? Learn more at Microsoft Customer Co-creation
2022 Release Wave 1 PlanDynamics 365 release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.
2022 release wave 1 plan
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Community | FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Upcoming TechTalks | All TechTalks
In the previous post, we saw how we can register webhook for the azure durable function. In this post we’ll see how we can use custom global action to invoke webhook and pass plugin execution context to the webhook.
Let’s go to D365 instance and create a global action as shown below:
We have passed 3 input parameters as mentioned below: ServiceCeaseDate : Date value to be updated on accommodation payment records(Expected Refund Due Date)TargetEntity : Entity name passed as stringTargetID : GUID of contact record to be passed as string
Then let’s write code to invoke webhook. Since webhook details are stored in serviceendpoint entity we are passing schema name of this entity and plugin execution context on Line 17(highlighted below) as shown:
public class ExecuteActionUpdateAccommodationPayments : PluginBase
override public void Execute(ILocalPluginContext localContext)
IServiceEndpointNotificationService cloudService = (IServiceEndpointNotificationService)localContext.CloudService;
if (cloudService == null) return;
var dataContext = new CrmServiceContext(localContext.OrganizationService);
var webHookIDSetting = (from s in dataContext.dxc_systemsettingSet
where s.dxc_name == "WebHookID"
&& s.dxc_Group == "Other"
if (string.IsNullOrWhiteSpace(webHookIDSetting)) return;
string response = cloudService.Execute(new EntityReference("serviceendpoint", new Guid(webHookIDSetting)), localContext.PluginExecutionContext);
We are getting webhook GUID from system setting(custom entity) as shown on line 9-13(highlighted above) instead of using hardcoded GUID as shown below:
Then let’s deploy the code using plugin registration tool and add a step for action as shown below:
In the next post, we’ll see how we can execute custom global action using JS based on a particular business requirement.
Hope it helps !!
Business Applications communities