Dynamics 365 – Input and Output Parameters of Custom Actions

Actions in Dynamics 365 are a type of process that used to extend the functionality of Dynamics 365. You can invoke actions through a workflow, plugin, Javascript or API. We can pass the Input parameters to the custom Action and the results can be set as Output parameters.

C# Code of Reading Input Parameters and Setting Output Parameters of the Custom Actions:

private static void ExecutePlugin(LocalPluginContext localContext)
{
var context = localContext.PluginExecutionContext;
//Read your Input Parameters
var entityId = context.InputParameters["EntityId"] as string;
var fieldNamesToCalculate = PluginContext.Context.InputParameters["FieldNamesToCalculate"] as string;
//write your logic
//.
//.
//.
// Set Output Parameters
pluginContext.Context.OutputParameters["Response"] = "Success";
pluginContext.Context.OutputParameters["IsSuccess"] = true;
}
view raw Actions.cs hosted with ❤ by GitHub

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s