Velocity script to retrieve latest custom object field
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}
- #if( $Listing && !$Listing.isEmpty() )
- #set( $firstItem = $Listing[0] )
- #set( $lastItem = $[$math.sub($Listing.size(),1)] )
- #end
Thanks for your time and effort to read through ![]()