Instead of using an event handler for when dialog boxes show I decided to make an event handler that ties into the UIApplication.Application.FailuresProcessing
event. I found the information on the failure API from the Building Coder.
The code below will suppress all warnings.
private void Application_FailuresProcessing(object sender,
FailuresProcessingEventArgs e)
{
FailuresAccessor failuresAccessor = e.GetFailuresAccessor();
IEnumerable<FailureMessageAccessor> failureMessages =
failuresAccessor.GetFailureMessages();
foreach (FailureMessageAccessor failureMessage in failureMessages)
{
if (failureMessage.GetSeverity() == FailureSeverity.Warning)
failuresAccessor.DeleteWarning(failureMessage)
}
e.SetProcessingResult(FailureProcessingResult.Continue)
}
You can add an if statement checking for failureMessage.GetFailureDefinitionId().Guid == new Guid("3d983f31-9ee3-4c3a-bed8-663b32cecec5")
if you only want to suppress the specific coordination review message.