Need to display email script information in a table format for the notification?

Deepika61
Tera Contributor

Hi All,

I want to display to display email script  information in a table format for the notification?, this notification basically trigger when fields(termination value , contract termination) changes 

Email script :

if (event.parm2 == "contract_termination") {

template.print("Contract Termination changes from " + event.parm1 + " to " + current.u_contract_termination);
} else if (event.parm2 == "termination_value") {
template.print("Termination value changes from " + event.parm1 + " to " + current.u_termination_value);
} else {
template.print("Contract Termination changes from " + event.parm1 + " to " + current.u_contract_termination);
template.print('<br>');
template.print("Termination value changes from " + event.parm2 + " to " + current.u_termination_value);
}

Business rule:

if (current.u_contract_termination.changes() && current.u_termination_value.changes()) {
gs.eventQueue('cg_field_changes', current, previous.u_contract_termination, previous.u_termination_value);
}else if (current.u_contract_termination.changes()) {
gs.eventQueue('cg_field_changes', current, previous.u_contract_termination, "contract_termination");
} else if (current.u_termination_value.changes()) {
gs.eventQueue('cg_field_changes', current,previous.u_termination_value,"termination_value");
}

And we have one table format code actually so we need to implement that code to my script

Table code

find_real_file.png

Please help me to complete this

Thanks

Deepika

 

 

5 REPLIES 5

@Deepika  The above you can use as a sample and replace the gr.getDisplayValue() with current.getDisplayValue(<field_name>)