AnsweredAssumed Answered

Velocity Script - Default Value Issue

Question asked by Cristina Leonetti on Jun 19, 2019
Latest reply on Jun 20, 2019 by Sanford Whiteman

Hello All,

I'm trying to set a default value to my velocity script but seems I'm doing mistakes coding the script but I don't know where I'm doing wrong.


The script is cutting the abbreviation from the sales person name, if empty we want to display another value. The code returns an error:


#set ($accountOwner = $lead.Account_Owner__c)#if ($accountOwner == "")The Company Team #else  #set ($accountOwnerSimple = $accountOwner.replaceAll("\s*\(.*\)\s*$", ""))Here's the $accountOwnerSimple


I'm not a developer so I'm sorry if the coding seems stupid to you! I'm learning!


Thanks in advance,