AnsweredAssumed Answered

Velocity script to retrieve latest custom object field

Question asked by Andrew Cho on Jan 22, 2018
Latest reply on Jan 25, 2018 by Andrew Cho

Hi all,

 

I am currently having trouble trying to retrieve the latest custom object added.

As an example,

 

When someone lists their vehicle onto our platform a custom object 'Vehicle' is attached to the lead with a Listing ID.

I want to get that ID to use in a link in the email.

 

However I need it to return the latest custom object listing ID.

 

From researching i see that something like this will work, however I am trying to fit mine into it.

 

I am finding it difficult to fit it in ${Listing_cList.get(0).listingID}

 

  1. #if( $Listing && !$Listing.isEmpty() ) 
  2. #set( $firstItem = $Listing[0] ) 
  3. #set( $lastItem = $[$math.sub($Listing.size(),1)] ) 
  4. #end 

 

 

Thanks for your time and effort to read through

Outcomes