In Guidewire ContactManager, we are trying to implement a “soft exception”. By this I mean we want a DisplayableException to appear when a certain condition arises when creating or updating a contact, but after clicking “Update” a second time, we want the DisplayableException to not appear any longer and the contact to be created.
Any GW gurus out there run into this kind of req’t before and if so what did you do? Ideally if this could be implemented in a Rule (.grs file) that’d be great but we also are using an Enhancement class extending ABContact that we could always move our functional code into if that needs to be done.
Validation rules. Reject with a warning. There will be a warning message that can be dismissed and then the user can still move forward with the update.
See the documentation here:
https://docs.guidewire.com/self-managed/cc/1023/rules/gosuRules/cc/topics/r_fz17108710.html
To reject with a warning, for example, you could do this within a validation rule. There are other reject methods that also specify the exact field causing the issue you can use if you desire.
contactObject.reject(null, null, ValidationLevel.TC_LOADSAVE, "your warning message")
You pass null to the error fields (first 2 fields in the method) because you want the rejection to be non-blocking.
10