We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

Apply Template for parent record using on declarative action

Ramesh Mende1
Tera Contributor

I have created one declarative action (sys_declarative_action_assignment) for applying the template in service operation workspace in that I have used below script ,this is not working can someone please help here

function onClick() {
    var selectedRec = g_list.getChecked();
    var tempSysId = selectedRec.split(',');
    alert(" Adding action taken");
    parentRecordSysId.applyTemplate(tempSysId);
}


FYI:-

RameshMende1_0-1752758443040.png

 



2 REPLIES 2

Ankur Bawiskar
Tera Patron

@Ramesh Mende1 

are you getting alert?

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

Hi  Ankur Bawiskar

Thanks for the reply
I am getting alert but functionality is not working.