Throw Custom Exception in AME
Hi,
We are using AME to get Purchase requisition approver's list. We are using the dynamic query in approvers group to get the approvers list as generating the approvers' list contains a lot of custom logic. We want to throw a custom error on the iprocurement screen whenever someone in the hierarchy is not having any supervisor. we generating the approver's list using below query
select person_id
from table(xx_po_req_approval_list_pkg.get_req_apprv_list(p_req_hdr_id => :transactionId)).
As per current logic whenever someone is missing the supervisor we are erasing the list and populating the person_id with -999(Invaild) then AME will not allow the user to proceed and throwing a generic exception as " Approval List could not be generated. Please contact your System Administrator to review AME rules setup". Here we want to throw some more meaningful exception. Can someone please help us here to build some good logic.