Encompass SDK – Loan associate info

A Loan Associate is a User or UserGroup which has been assigned to a role within the loan. A loan associate is typically responsible for completing one or more tasks during the lifetime of a loan.

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

class LoanManager
{
public static void Main(string[] args)
{
// Open the session to the remote server
Session session = new Session();
session.Start(“myserver”, “mary”, “maryspwd”);

// Open a loan from the My Pipeline folder and retrieve the information on the current lock
Loan loan = session.Loans.Folders[“My Pipeline”].OpenLoan(“Example#1”);

// Loop thru the assigned loan associates and display the user info for each.
foreach (LoanAssociate la in loan.Associates)
{
// Write the role abbreviation and the user’s name
if (la.AssociateType == LoanAssociateType.User)
Console.WriteLine(la.WorkflowRole.Abbreviation + “: ” + la.User.FullName);
else if (la.AssociateType == LoanAssociateType.UserGroup)
Console.WriteLine(la.WorkflowRole.Abbreviation + “: ” + la.UserGroup.Name);
}

// Close the loan file
loan.Close();
session.End();
}
}

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.