![]() For the latest documentation, see Microsoft Dynamics 365 product documentation. This will save the hours and increase productivity, when 1000s of invoices involved for approval in certain organizations.This content is archived and is not being updated. With the above 2 approaches mentioned, we can auto approve the AP invoices from backend for the invoices where user review or intervention is not required. 'Exception in auto approval main block-' || SQLERRMĭBMS_OUTPUT.put_line ( 'Exception in auto approval main block-' || SQLERRM) V_hist_rec.approver_comments := 'System Auto Approved' Īp_workflow_pkg.insert_history_table (v_hist_rec) V_hist_rec.response := 'MANUALLY APPROVED' V_hist_rec.amount_approved := v_invoice_amount V_hist_rec.history_type := 'DOCUMENTAPPROVAL' SET wfapproval_status = 'MANUALLY APPROVED' ( 'Invoice approval workflow is forcibly stopped') 'Invoice approval workflow is forcibly stopped' 'INV_SUM_ACTIONS_WFAPPROVE.do_force_approval' IF (UPPER (v_validation_status) 'APPROVED')įnd_file.put_line (fnd_file.LOG, 'Invoice is not validated') ĭBMS_OUTPUT.put_line ( 'Invoice is not validated') ( 'Exception retrieving invoice validation status-' 'Exception retrieving invoice validation status-' INTO v_org_id, v_invoice_amount, v_wfapproval_statusįnd_file.put_line (fnd_file.LOG, 'Exception in first block-' || SQLERRMĭBMS_OUTPUT.put_line ( 'Exception in first block-' || SQLERRM) Īpps.ap_invoices_pkg.get_approval_status (p_invoice_id, SELECT org_id, invoice_amount, wfapproval_status V_wfapproval_status ap_invoices_all.wfapproval_status%TYPE V_validation_request_id ap_invoices_all.validation_request_id%TYPE V_invoice_amount ap_invoices_all.invoice_amount%TYPE V_hist_rec ap_inv_aprvl_hist_all%ROWTYPE V_user_name VARCHAR2 ( 150) := 'SYSTEM-USER' CREATE OR REPLACE PROCEDURE ap_inv_auto_approval (p_invoice_id IN NUMBER) You can create a pull request, in case of making any changes to the code here. System will approve the invoice before the workflow get initiated.īelow procedure can be invoked after the successful validation of invoice to approve the invoice and insert the approver history. user will not receive any notifications on the approval request. In this approach, the AP invoice will be approved without initiating the workflow or AME process i.e. System Approval skipping workflow process ![]() Because this approach will automate the process of user approval. Remember, the approval history will show the username of the approver mentioned in the AME process, not the system user. The workflow has to be initiated with the below API AP_WORKFLOW_PKG.CREATE_INVAPP_PROCESSĪfter the initiation, we can call the APPROVE_BUTTON API to approve the workflow automatically. So if there an instant approval required for the invoices from the system. It will clear the item from user notification list as well.īut often auto approval will not wait until the workflow background process make the initiation,unless being called as separate processed. So once the above API is been triggered, this will auto approve the workflow which was pending with the approver. If the invoice has to be approved by system behalf of the user, then the initiated workflow has to be approved using the below API AP_WORKFLOW_PKG.APPROVE_BUTTON Upon workflow initiation, approver will get a notification on the invoice review and approval. Later then the workflow background process will initiate the AME workflow approval process for the invoices with status as 'REQUIRED' and update to 'INITIATED'. If the invoice approval setup is enabled. ![]() ![]() Once AP invoice get created, the workflow approval status will be set as 'REQUIRED'.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |