Page 1 of 1

How to set Loan Funding settlement line (CSS)

Posted: Fri Jun 01, 2018 10:59 am
by BobRichards
A developer wanted to know how to set the CSS Line on the Loan Funding screen. Below is an example for CSS. It can be easily modified for other settlement types. Be aware that in CSS settlements, the section names can be modified by end users and each section has properties that may preclude it from being a target line for a loan funding object. Also notice we use "loan.CSS" since it is always set to the correct settlement object. If this order had multiple settlements (i.e. three CSSs) then this would save us from having to manually determine the CSS to get a next line from.

Code: Select all

// Get the loan we want to modify. (First one for this example.)
var loan = ((dynamic)order).Loans[0];

// Get the next unused CSSLine from the LOAN section.
var cssLine = loan.CSS.Sections["LOAN"].NextAvailableLine();

// Set the Funding CSSLine to new line.
loan.Funding.CSSLine = cssLine;