Subscribe to Events Triggered from the Parent Application

Subscribe to Events Triggered from the Parent Application

The following events are triggered from the Parent Application. The client app can subscribe to these events using elli.script.subscribe().

  • open is triggered when a loan is opened in TPO App.
elli.script.subscribe('loan', 'open', onLoanOpened);

// proxy: reference to TPO Loan Object which caused the event 
// eventData: event data transmitted from parent. 
// In this case it is new loan data object returned after saving 
function onLoanOpened(proxy, eventData) { 
  console.log('loanData ====', eventData) 
}
  • change is triggered when a user saves the loan.
elli.script.subscribe('loan', 'change', onLoanSaved); 
// proxy: reference to TPO Application Object which caused the event 
// eventData: event data transmitted from parent. 
// In this case it is new loan data object returned after saving 
function onLoanSaved(proxy, eventData) { 
  console.log('loanData ====', eventData) 
}