Notifications

280 views

Description

  • Having a generic notification used for all our catalog items (about 300 ones).
  • GlideappVariablePoolQuestionSet returns the variables in the correct order.
  • However, there is no sign of MRVS in there.

Steps to Reproduce

The problem is that the OOTB function method only prints flat variables:

var set = new GlideappVariablePoolQuestionSet();
set.setRequestID(sc_req_item.sys_id);
set.load();
var vs = set.getFlatQuestions();


Workaround

  • The issue will not be fixed as the end user can always use a mail script in order to print the variable in multi row var set.
  1. Try to access variables and sending notification using a workflow.
  2. Or you can try below code in the email script by getting the MRVS used in a particular request (Even if few are getting visible/display on the basis of some UI policy)
var ritmGR = new GlideRecord('sc_req_item');if (ritmGR.get(current.sys_id)) //Here you need to get the current request's sys_id
{
mrvs = ritmGR.variables.book_details; //multi row variable set info. Here insted of giving specific name you can use name of MRVS returned after querying variable set of a catalog item
rowCount = mrvs.getRowCount();
for (var a = 0; a < rowCount; a++) {
var row = mvrs.getRow(a);
template.print( "<tr>" );
template.print( "<td><center>" +row.type + "</center></td>" );
template.print( "<td><left>" +row.title + "</left></td>" );
}
  • If you choose the above code option, use it in mail script before trying with workflow.

Related Problem: PRB1406382

Seen In

There is no data to report.

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2020-09-28 09:39:58
Published:2020-07-21