Document Template - generate PDF with Subject Person name in the title
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2024 09:02 AM
Hi all,
Is there any way to generate a PDF document with "Subject Person" name in the title? We are using "Document Templates" plugin.
Thank you in advance,
Victoria
- Labels:
-
Human Resources Service Delivery
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2024 10:58 AM
Hi @vstefanova ,
I faced similar issue. We can achieve this using customization.
Please create Before/insert BR in 'sys_attachment' table with global application scope.
(function executeRule(current, previous /*null when async*/ ) {
var case = new GlideRecord("sn_hr_core_case_global_mobility"); // put table name as per you configuration
case.addEncodedQuery('sys_id=' + current.table_sys_id);
case.query();
if (case.next()) {
var EmpName = case.subject_person.name;
}
current.file_name = 'Employee offer letter-' + EmpName;
// gs.info('EmpNameFilename' + current.file_name);
})(current, previous);
May be RCA record will be created post that please allowed RCA with target scope.
Please helpful & mark answer if it's really worthy for you.