Page 1 of 1

Differentiating between instances of LegalDescriptions

Posted: Tue Apr 16, 2019 5:25 pm
by kylecrosland
Hello,

I'm trying to place a custom order rule in the LegalDescription.LookupCode field. I want a rule that sets the value of the field to 'Comm Legal' when the field is associated with the EscrowLegal or the PolicyLegal, but not the CommitmentLegal. I want the LookupCode field of the CommitmentLegal to remain blank by default.

This is what I tried:

def LegalDescription_LookupCode_Value (args):
if str(args.Context) != 'CommitmentLegal':
args.Value = 'Comm Legal'

Any advice? Thanks!

Kyle

Re: Differentiating between instances of LegalDescriptions

Posted: Tue Apr 16, 2019 5:39 pm
by kylecrosland
Figured it out.

def LegalDescription_LookupCode_Value (args):
if str(args.Context.Owner.EscrowLegal) == str(args.Context) or str(args.Context.Owner.PolicyLegal) == str(args.Context):
args.Value = "Comm Legal"

Re: Differentiating between instances of LegalDescriptions

Posted: Wed Apr 17, 2019 10:28 am
by BobRichards
Great job!