Script runner send custom email problem

joshO October 22, 2013

Hello Everyone,

I seem to be having an issue trying to get my post function custom email to work. Everything appears to work fine if I preview the email through the admin settings but once I put everything in place in my workflow I recieve errors saying the property is not found.

could it be the way I wrote my code ?

<%

if(cfValues['Comment'])
  {
    out << "Test : ${cfValues['Comment']}"
  }
  else
  {
  out << "Test."
  }

%>

1 answer

1 accepted

1 vote
Answer accepted
Henning Tietgens
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 23, 2013

Try the same not using GStrings ${} feature. So instead

"Test : ${cfValues['Comment']}"

write

"Test " + cfValues['Comment']

Henning Tietgens
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 23, 2013

Is "Comment" a custom field? If not, you should write transientVars.comment instead.

joshO October 23, 2013

Thats Great! Thank you very much that was exactly what I was looking for.

Suggest an answer

Log in or Sign up to answer