Approval Hierarchy - top approver by role
We would need to create approvals based on manager hierarchy where the top approver is is the CEO. The solution often provided is to put
Top participant = HierarchyBuilder.getPrincipal("corp",-1,"","")
Since this means the username of the CEO is hardcoded we would need to replace it by an argument that is less change-prone.
We were thinking of giving the CEO a certain "dummy" role and then get the CEO in the various approvals by searching for a user with this role. This would keep the CEO-change limited to assigning the role as opposed to changing all the approval rules.