How to create UI Action to export the form data in docs form?

Ankita Kolhe
Tera Contributor

Hi Community,

I want an UI Action in Problem form that should export the form details in docs form after clicking on it

Any responses will be appreciared.

Thanks,

Ankita

6 REPLIES 6

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

generating doc file is not possible directly in ServiceNow.

You can generate Excel, CSV etc and by clicking UI action can download it

Regards
Ankur

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

Thanks Ankur for your response.

 

I tried to export in pdf form but it's not working.UI Action 'Generate PIR' on Problem form is not clickable.

Kindly help me on the same.

find_real_file.png

find_real_file.png

Hi,

I have shared solution for this 1 year ago

How to script a Pdf Form export

Another way

var sysparm_query = "sys_idIN" + g_form.getUniqueValue();

var sysparm_view = "default";

// unload_pdflandscape for pdf landscape

// unload_pdf+landscape for detailed landscape

// unload_pdf for portrait

// unload_pdf+ for detailed portrait

// use as per your need
var dialog = new GwtPollDialog(g_form.getTableName(), sysparm_query, 1, sysparm_view, 'unload_pdf');

dialog.execute();

regards
Ankur

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

@Ankita Kolhe 

Hope you are doing good.

Did my reply answer your question?

If my response helped please close the thread by marking appropriate response as correct so that it benefits future readers.

Regards
Ankur

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