Want to create a ui action to export record as pdf

Akshata5
Tera Guru

Hello,

I want to create a UI action on the custom record. I know we have this option to export as PDF in the form context. But I also want a UI action basically a button on the record. Can't find the script to do this.

Any help appreciated! Thanks!

 

1 ACCEPTED SOLUTION

Tai Vu
Kilo Patron
Kilo Patron

Hi @Akshata5 

You can create an UI Action and g_navigation to open the URL exporting PDF.

Sample below.

TaiVu_0-1701064898058.png

function printPDF(){
	var uri = g_form.getTableName() + '.do?sys_id=' + g_form.getUniqueValue() + '&PDF';
	g_navigation.open(uri);
}

 

 

Cheers,

Tai Vu

View solution in original post

2 REPLIES 2

Tai Vu
Kilo Patron
Kilo Patron

Hi @Akshata5 

You can create an UI Action and g_navigation to open the URL exporting PDF.

Sample below.

TaiVu_0-1701064898058.png

function printPDF(){
	var uri = g_form.getTableName() + '.do?sys_id=' + g_form.getUniqueValue() + '&PDF';
	g_navigation.open(uri);
}

 

 

Cheers,

Tai Vu

Thank you so much. It worked like a charm.