Block 2nd Underwriter Contact

Questions about and code samples for custom order rules and validation within Select.
Post Reply
EricaHH
Posts: 6
Joined: Mon Apr 10, 2017 4:08 pm

Block 2nd Underwriter Contact

Post by EricaHH »

We are having an issue where 2 different underwriters are being added to a file, and it is causing issues with dispersing & accounting.
I am trying to find a way to block a U2 contact from being created, and I believe I can do that with a COR but I am having trouble determining the best way to handle this.
Any help would be greatly appreciated!
BobRichards
Posts: 1376
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: Block 2nd Underwriter Contact

Post by BobRichards »

In a custom validation routine, we can look at the total number of Underwriters and if it exceeds one then raise an error. That will stop the order from being saved until the user gets the number of Underwriters below 2.

Code: Select all

def Order_Underwriters_Validate(args):
    if args.Context.Underwriters.Count > 1:
        args.RaiseError('Only one underwriter is allowed.')
Bob Richards, Senior Software Developer, SoftPro
Post Reply