Update approval source from service portal approval widget?

robhaas
Tera Contributor

When a user that has an approval record pending their action goes to service portal and clicks 'approve' from the OOB widget, I would like to set the approval source on the approval record to 'ui.serviceportal' or something of the like. I've been logging items to console, but not too sure how to go about this.

The button calls this:

ng-click="approve(approval.sys_id);

Which is the below code:

  $scope.approve = function(id) {

      $scope.data.op = "approved";

      $scope.data.target = id;

      get();

  }

My thought was to try setting data.target.approval_source but that is undefined when I output to the console log. Any thoughts on a path here? TIA

2 REPLIES 2

shill
Mega Sage

Did you ever find a solution to this? I am running into the same issue as we want to be able to report on the different ways our users interact when they are approving.

Mahesh15
Tera Contributor

Hi Shill,

Did you manage to get this requirement? i have a similar requirement to develop.