How to print the variables on a Task form in a specified order

Gowtham Kodali
Tera Contributor

Hi,

Is is possible to print the variables which are present in the Task form in a specific layout

How can we achieve this if possible 

 

Thank you

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@Gowtham Kodali 

please refer below link for help

Label Printing:- End user details from a Request or Incident

If you want the print in custom format then you will have to use UI page

you can also use Printer friendly option

this can be accomplished by navigating to the record in question. Once there, click the gear icon in the upper-right hand corner of the screen which presents with a menu like so:



And click "Printer friendly version" as indicated by my cursor.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

10 REPLIES 10

If you want to print from background script use:

var grTask = new GlideRecord('sys_dictionary');
grTask.addEncodedQuery('name=task');
grTask.orderBy('column_label');
grTask.query();
while (grTask.next()) {
    gs.print(grTask.column_label);

}

Result will be:

find_real_file.png

Or revers the order using:

var grTask = new GlideRecord('sys_dictionary');
grTask.addEncodedQuery('name=task');
grTask.orderByDesc('column_label');
grTask.query();
while (grTask.next()) {
    gs.print(grTask.column_label);
}

Willem
Giga Sage
Giga Sage
  1. What is the order it should be in?
  2. What do you mean by print?
  3. Only on the Task level or other task types?

Print means  I would like to print the form on a paper all  fields which are there on the form should be printed on to the paper

Ankur Bawiskar
Tera Patron
Tera Patron

@Gowtham Kodali 

please refer below link for help

Label Printing:- End user details from a Request or Incident

If you want the print in custom format then you will have to use UI page

you can also use Printer friendly option

this can be accomplished by navigating to the record in question. Once there, click the gear icon in the upper-right hand corner of the screen which presents with a menu like so:



And click "Printer friendly version" as indicated by my cursor.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Ankur Bawiskar
Tera Patron
Tera Patron

@Gowtham Kodali 

Hope you are doing good.

Let me know if I have answered your question.

If so, please mark appropriate answer as correct & helpful to close the thread.

If not, please let us know if you need some more assistance.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader