Skip to content

Commit 4848474

Browse files
authored
Update approval.js
Instead of hardcoding the table name . Write current.sys_class_name so that in future if we we need the business rule on change tasks. We can write the business rule on Task table.
1 parent b1b1b19 commit 4848474

File tree

1 file changed

+1
-1
lines changed
  • Server-Side Components/Business Rules/After-BR to generate approvals for catalog tasks

1 file changed

+1
-1
lines changed

Server-Side Components/Business Rules/After-BR to generate approvals for catalog tasks/approval.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ var sysApp = new GlideRecord('sysapproval_approver');
66

77
sysApp.state = 'requested'; //set the state to requested
88
sysApp.sysapproval = current.sys_id; // set the 'Approval for' field with the current catalog task
9-
sysApp.source_table = 'sc_task'; // set the source table field so that document ID table can be updated properly as it is dependent on source table field.
9+
sysApp.source_table = current.sys_class_name; // set the source table field so that document ID table can be updated properly as it is dependent on source table field.
1010
sysApp.approver = 'sys_id of the person for whom you want to trigger this approval'; // set the approver
1111
sysApp.document_id = current.sys_id; //set the sys_id to populate correct value in the Approving field.
1212

0 commit comments

Comments
 (0)