Encompass SDK – Create a loan file using codes

The following code creates a new loan, sets the value of several fields, and then commits the loan to the database.

using System;
using System.IO;
using EllieMae.Encompass.Client;
using EllieMae.Encompass.BusinessObjects;
using EllieMae.Encompass.BusinessObjects.Loans;

class LoanReader
public static void Main()
// Open the session to the remote server
Session session = new Session();
session.Start(“myserver”, “mary”, “maryspwd”);

// Create the empty shell for the new loan. At this point,
// the loan has not been saved to the Encompass server.
Loan loan = session.Loans.CreateNew();

// Set the loan folder and loan name for the loan
loan.LoanFolder = “My Pipeline”;
loan.LoanName = “Harrison”;

// Set the borrower’s name and property address
loan.Fields[“36”].Value = “Howard”; // First name
loan.Fields[“37”].Value = “Harrison”; // Last name
loan.Fields[“11”].Value = “235 Main St.”; // Street Address
loan.Fields[“12”].Value = “Anycity”; // City
loan.Fields[“13”].Value = “Anycounty”; // County
loan.Fields[“14”].Value = “CA”; // State
loan.Fields[“15”].Value = “94432”; // Zip code

// Save the loan to the server

// Write out the GUID of the newly created loan

// End the session to gracefully disconnect from the server


You may also like...

Popular Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.