custom ui actions are not visbile to delegation approvals

lakshman nalla
Tera Contributor

hi 

 we have custom ui actions for approve and reject the requests those ui actions are working good for the approver, but when approver is not available, he is delegating his work to another user. when delegated user opens the request,

please find below script for your reference.

 

    isValidApprover: function(approver) {
		var isreturn = false;
        var appr = new GlideRecord('sysapproval_approver');
        appr.addEncodedQuery('sysapproval=' + approver.sys_id + '^approver=' + gs.getUserID() + '^state=requested');
        appr.query();
        if (appr.next()) {
            isreturn = true;
        }
        isreturn =  new ApprovalDelegationUtil().isMyApproval(current);
        return isreturn;


    },

    approveRejectTask: function(approver, action) {
        var appr = new GlideRecord('sysapproval_approver');
        appr.addEncodedQuery('sysapproval=' + approver.sys_id + '^approver=' + gs.getUserID() + '^state=requested');
        appr.query();
        if (appr.next()) {
            if (action == 'approve') {
                appr.state = 'approved';
            } else if (action == 'reject') {
                appr.state = 'rejected';
            }
            appr.update();
        }
    },

 

he is not able see the ui actions.

3 REPLIES 3

lakshman nalla
Tera Contributor

delegated person not able to see the UI actions

 

Lom
Tera Contributor

Hello lakshman nalla, does the delegated user have the same roles than the delegator?

It seems to be a permission issue.

marcelotell
Tera Contributor

Unfortunately it doesn't seem to be a permission issue, I'm facing the same problem