how to get field values throgh mail Script

Siva82
Tera Expert

Hi Everyone,

I am Developing Notification Now.

I need to get the filed value(u_platform_type) from custom table (u_platform) though the mail script.

Can you help me on mail script..

Thank you.  

 

1 ACCEPTED SOLUTION

Jaspal Singh
Mega Patron
Mega Patron

What table notification is on? Is there a common/primary key in your notifcation table & u_platform table?

If you you need to try something as below

(function runMailScript(current, template, email, email_action, event) {

  var nameis = new GlideRecord("u_custom"); //replace table name

  nameis.addQuery("xyz", current.abc); //common field name to be replaced with abc here & xyz is field that is in custom table with same value as abc in current notification table

  nameis query();

  if(nameis.next()) {

  template.print('Platform value '+nameis.u_platform_value.getDisplayValue());

  }

})(current, template, email, email_action, event);

View solution in original post

5 REPLIES 5

shloke04
Kilo Patron

Hi @Siva

I see you have marked the response as helpful which is great. If you have a follow up query do post here else please mark the answer as correct and close this thread for others.

Regards,

Shloke

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke