We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Adding ticket Description in the mention email.

yuhengl
Tera Contributor

Hi i wanted to add in the description in the mention email at the Email script. But when i tried to put in the code to display but all it gives was undefined. but it was able to get other information. 

 

 

 

	var recordGR = new GlideRecord(current.table);
	if(recordGR.get(current.document)) {
		var displayValue = recordGR.getDisplayValue();
		var subjectText = displayValue
			? displayValue
			: "a record discussion";
		var tableDisplay = recordGR.getClassDisplayValue();
		var linkText = displayValue
			? "the " + tableDisplay  + " record " + displayValue
			: "this " + tableDisplay  + " record ";

		email.setSubject("You have been mentioned in " + subjectText);
		template.print("<p>You have been mentioned by " + current.user_from.name +"</p>");
		template.print("<p>description "+ current.desciption + "</p>");
		template.print("<p> comments as :<p>" +  recordGR.comments.getJournalEntry(1) +"</p></p>") ;
		template.print("<p> in <a href='/" + recordGR.getRecordClassName() + ".do?sys_id=" + recordGR.getUniqueValue() + "'>" + linkText + "</a></p>");
	}
	

 

 

 

 

yuhengl_0-1722325422957.png

 

0 REPLIES 0