Hello everyone,
In previous verions of CRM I have been able to execute successfully actions via C# console application or plugins. But in this scenario, a Dynamics 365 9.x envionment, I am having an issue and I cannot find any answer about it.
I am using the following code to execute the action:
//Define the action as a OrganizationRequest
var targetAction = new OrganizationRequest("actionlogicalname"); // Action logicalName
//Define Input Parameters.Only mandatory parameters are needed for a successful execution, optional parameters can be added too.
targetAction["Inputparameter1"] = "value1";
targetAction["Inputparameter2"] = "value2";
targetAction["Inputparameter3"] = "value3";
targetAction["Inputparameter4"] = "value4";
Console.WriteLine("Input parameters provided sucessfully");
//Execute the action
OrganizationResponse response = service.Execute(targetAction);
Console.WriteLine("Action executed successfully");
Console.ReadKey();
But by any reason, I am experiencing the following issue on the service.Execute(targetAction): "System.ServiceModel.FaultException`1: 'Required field 'Name' is missing'"
Does anyone have any insight regarding this issue?