Newer
Older
import { Contact, ContactTitleRenderer } from "Contact_lib";
var contactId = vars.get("$field.prefferredApprover");
if(contactId)
{
var contact = new Contact();
[contact.salutation, contact.title, contact.firstname, contact.middlename, contact.lastname]
= newSelect("PERSON.SALUTATION, PERSON.TITLE, PERSON.FIRSTNAME, PERSON.MIDDLENAME, PERSON.LASTNAME", "Data_alias")
.from("CONTACT")
.leftJoin("PERSON", "PERSON.PERSONID = CONTACT.PERSON_ID")
.whereIfSet("CONTACT.CONTACTID", contactId)
.arrayRow(true);
result.string(new ContactTitleRenderer(contact, ContactTitleRenderer.OPTIONS.NoOption)
.asString());