Think Dynamic, Do Dynamic Microsoft Dynamic CE | Powerapps || Dynamic CRM || Power Apps || Power Platform || Canvas App || D365CE

CREATING A CUSTOM ACTION AND CALLING IT FROM WEB API IN DYNAMICS 365 POWER APPS

 In Dynamics 365 and Power Apps, we can create Custom Actions and use these with plugins to invoke business-specific code through the Power Apps / Dynamics 365 Web API. These actions don’t even need any parameters to run and can contain no steps. They will simply execute our custom code, which can do whatever we want and we can invoke when we want.

In this example, let’s create a plugin that will create a contact called “Bob Smith” (simple example). Unlike other plugins, we won’t register this to run when a typical message such as a create/retrieve/update/delete runs on an entity. Instead, we will create a new custom Action in the process designer and will call it from JavaScript code through the Web API, showing we can have this new code run how we want it to (without binding it to an event).

First, let’s create a new plugin. Open Visual Studio and create a new Class Library.

Install the Microsoft.CrmSdk.CoreAssemblies using NuGet:

Rename the file to CustomAction (or whatever you want) and add the code below, where we are using IPlugin and code in our Execute method to create a new contact:

Read More


Share:

0 Comments:

Post a Comment

Dynamic 365

Talha Manzoor. Powered by Blogger.

About Me

My background is entirely involved in Microsoft Dynamics CRM Sales/Service/Marketing solution management, implementation, development, .Net Development, with the majority of it in Microsoft Dynamics CRM 2011/2013/2015/Online and .Net Solutions Implementation, Development and Application analysis. Extensively worked in Dynamics CRM Customization and Configuration, Plugins, custom workflow activities, Rest, Soap,Javascript and CRM custom integration and data migration.

Ex-QB Mark Sanchez arrested, faces three possible charges

  Ex-QB Mark Sanchez arrested, faces three possible charges Former NFL quarterback and current Fox Sports broadcaster Mark Sanchez was arres...

Search This Blog

Design by - Blogger Templates | Distributed by Talha Manzoor

Social

pictory

No Thumbnail

No Thumbnail