How can i get the errorcode of my InvalidPluginExecutionException in a catch statement? The errorcode of the FaultException is not equal to the errorcode of the InvalidPluginExecutionException.
public InvalidPluginExecutionException ( OperationStatus status, int errorCode, string message)
try
{...}
catch (FaultException<Microsoft.Xrm.Sdk.OrganizationServiceFault> ex)
{
var errorcode = ex.Detail.ErrorCode;
}