store script in record

store script in record

Will try to explain this the best I could .
I am trying to be able to create email templates to be used in the send mail function .

 A new record comes in it validates its ownership and fetches a record from its owner how to be notified record.
In the end I will need to do this with sendmail and posttourl but right now just trying to get one to work .

So I added a multiline txt field to the needed form and it fetches correctly .
The problem is that it doesnt pull information from the new form /


I have tried with all of these in the text box. I just retrieve that in the email.
It makes so much more sense to be able to store the record in the template .
I am trying to avoid have to have 50 different if statements for each template 

  1. input.Name 
  2. <%=Name%> 
  3. <%=input.Name>


  1. msg = rec1.Multi_Line;

  2. m = msg.replaceAll("\n","");
  3. sendmail
  4. (
  5.     To       :  " 
  6.     From     :  zoho.adminuserid 
  7.     Subject  :  "Test1 " 
  8.     Message  :  m 
  9. )
  10. sendmail
  11. (
  12.     To       :  
  13.     From     :  zoho.adminuserid 
  14.     Subject  :  "test2" 
  15.     Message  :  msg2 
  16. )