If I'm in the Softpro Select Client and have an order with more than 1 Loan Policy or Owner's Policy in the drop down for Policy under
Title Insurance Premiums
Prior Policy Adjustments
and I want to set the values under neath them within the API, How do I?
The First of each type gets set fine by me using the API and setting the structures
Order.Title.TitleInsuranceCalculations.OwnersPolicy.PriorPolicies.<fields>
Order.Title.TitleInsuranceCalculations.LoanPolicy.PriorPolicies.<fields>
But I don't know how to reference the other Loan Policy or Owner's Policy object in the drop down above.
thanks,
David
Multiple Products in Drop Down and how to set in API
-
- Posts: 1377
- Joined: Wed Jan 15, 2014 3:50 pm
- Location: Raleigh, NC
- Contact:
Re: Multiple Products in Drop Down and how to set in API
This is a good example of when to use the Field Code Browser to see the hierarchical structure of the Order model. If you navigate to TitleInsuranceCalculations (Order.Title.TitleInsuranceCalculations), you can see that this object is a collection of TitleInsuranceCollection objects. If you iterate over this collection, you will be able to access all of the loan and owners policies. For example:
The prior policies collection is a child of the policies that you can iterate over.
I used dynamics in this example, but you can use IOrderItem objects if you wish.
Code: Select all
dynamic firstTIC = Order.Title.TitleInsuranceCalculations[0]
dynamic firstLP = firstTIC.LoanPolicy
dynamic firstOP = firstTIC.OwnersPolicy
dynamic secondTIC = Order.Title.TitleInsuranceCalculations[1]
...
Code: Select all
dynamic priorPolicies = firstLP.PriorPolicies
Bob Richards, Senior Software Developer, SoftPro