Page 1 of 1

Setting PolicyType

Posted: Mon Mar 29, 2021 12:20 pm
by shawnregan
I am currently using the following for NE and IL/WI and it works. But its not working for CA orders I submit, the dropdown is blank.

Any ideas?

Code: Select all

var policyTypes = tState.EnumManager.GetEnum<IOrderPolicyType>();
IOrderPolicyType policyType = null;
policyType = policyTypes.Values.FirstOrDefault(i => i.Description == "Loan Only");

Re: Setting PolicyType

Posted: Wed Mar 31, 2021 1:46 pm
by BobRichards
Does the character case match in California? If Ca. is "Loan only", it will not match since the first letter in "only" is lower case.

What is the description string for the policy type? Does the label have embedded spaces?

Re: Setting PolicyType

Posted: Wed Mar 31, 2021 2:13 pm
by shawnregan
Yeah, I thought about the case and it matches what they have for CA.

I have no idea if it has embedded spaces. How can I tell?

Re: Setting PolicyType

Posted: Wed Mar 31, 2021 2:17 pm
by shawnregan
I could try .Trim() on Description.

Re: Setting PolicyType

Posted: Wed Mar 31, 2021 2:26 pm
by shawnregan
Its finding the policy value I am looking for in var policyTypes = tState.EnumManager.GetEnum<IOrderPolicyType>();

but when I apply it to the PolicyType property in SelectOrder.PolicyType and saved / apply changes to the order and close its not setting it.

Re: Setting PolicyType

Posted: Wed Mar 31, 2021 2:32 pm
by shawnregan
I found the issue and it was nothing on the SPS side. It was all me. Please close this thread. :)

Re: Setting PolicyType

Posted: Wed Mar 31, 2021 3:11 pm
by BobRichards
No worries. Been there.