throw new InvalidPluginExecutionException dialog box doesn't show up?? RRS feed

  • Question

  • Hi All,

    Can anybody please help me resolving the below issue.

    I have written a plugin to check the duplication of entity record with couple of field values and want to restrict the user creating the record.

    In my plugin, when my condition is passed, I am throwing InvalidPluginExecutionException to restrict the user creating the duplicate record.

    throw new InvalidPluginExecutionException("Record already exist");

    Instead of showing the dialog box and restrict the user, it is not showing up the dialog box and bypassing my validation to create the record.

    I have debugged my code and found the logic to be correct and it is throwing an exception (it is showing the message "Record already exist" in the exception) at the line of code given above.

    Why it is not showing up the InvalidPluginExecutionException dialog box? How can I fix it?

    Thanks & Regards,


    Thursday, July 9, 2015 11:04 AM


  • Hi All,

    I resolved this issue correcting my code.

                         catch (Exception ex)
                            tracingService.Trace("CheckDuplicate: {0}" + ex.ToString());
                            throw; // I missed out this line of code

    I missed out throwing the exception.



    • Marked as answer by K_Srinivas Friday, July 10, 2015 9:27 AM
    Friday, July 10, 2015 9:27 AM