Can I change the wording coming from system?

lonesoac01
Giga Guru

Hello all,

 

    Is it possible to change the wording for when related approval records are related to a record that needs approving?

Screenshot 2025-07-29 133711.png

Thank you.

4 REPLIES 4

Periyasamy P
Tera Guru

Yes, you need to customize function getApprovalComment in script include ApprovalCommentsUtil which is used by below business rules.

Approval Events (Task)

Approval Events (Non-Task)

    getApprovalComment: function(current, isFD) {
        switch (current.getValue("state")) {
            case 'requested':
                // USER-A requested to approve task
                return this._getComment(isFD, this._getApproverUserName(current.approver), "requested to approve task");
            case 'rejected':
            case 'approved':
                return this._getCommentForApprovedOrRejected(current, isFD);
            default:
                return "";
        }
    },

I tried to find the Script Include named: ApprovalCommentsUtil in my development environment, but it did not come up.  I attempted to find the function (getApprovalComment) with the application Studio Search function, but nothing was found there either.  I then went and created a new business rule, clicked on Advanced and the ApprovalCommentsUtil class did come up.  I then added a dot after the class to see what functions were available, and none really came up.  What am I missing here?

Try to locate this business rules running on table Approval [sysapproval_approver]. And check script, 

  • Approval Events (Task)
  • Approval Events (Non-Task)

Yousaf
Giga Sage

Hi @lonesoac01 

Try studio code search explained here to know where its coming from 
Using Code Search to make developing on the platform easier 


***Mark Correct or Helpful if it helps.***