100% found this document useful (2 votes)
455 views6 pages

ALERT ON Invoice If Gets Rejected by Approvers

This document describes how to create an alert that sends an email to the user who created an invoice if that invoice gets rejected during the approval process. It involves: 1. Selecting invoice data including number, dates, people involved, status, and rejection details. 2. Creating an action to send an email with the invoice rejection details to the creator's email address. 3. Adding the email action to an action set and configuring it. 4. Creating an alert that uses the action set and configures it to send on invoice rejections.

Uploaded by

Siddiq Mohammed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
455 views6 pages

ALERT ON Invoice If Gets Rejected by Approvers

This document describes how to create an alert that sends an email to the user who created an invoice if that invoice gets rejected during the approval process. It involves: 1. Selecting invoice data including number, dates, people involved, status, and rejection details. 2. Creating an action to send an email with the invoice rejection details to the creator's email address. 3. Adding the email action to an action set and configuring it. 4. Creating an alert that uses the action set and configures it to send on invoice rejections.

Uploaded by

Siddiq Mohammed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

CREATE ALERT TO SEND MAIL TO THE USER WHEN AN

INVOICE CREATED BY HIM GETS REJECTED FROM


APPROAL

Select statement:
SELECT DISTINCT

AI.INVOICE_NUM,

AI.CREATION_DATE CREATION_DATE,

(select PAPF1.FULL_NAME

from per_all_people_f PAPF1,

ap_inv_aprvl_hist_all ahl,

FND_USER FND

where AHL.invoice_id = ai.INVOICE_ID and ROWNUM=1

AND AHL.CREATED_BY = FND.USER_ID


AND FND.employee_id=PAPF1.PERSON_ID)LAST_UPDATED_PERSON,

(select PAPF1.EMAIL_ADDRESS

from per_all_people_f PAPF1,

ap_inv_aprvl_hist_all ahl,

FND_USER FND

where AHL.invoice_id = ai.INVOICE_ID and ROWNUM=1

AND AHL.CREATED_BY = FND.USER_ID

AND FND.employee_id=PAPF1.PERSON_ID)LS_EMAIL_ADDRESS,

AI.WFAPPROVAL_STATUS,

ahl.RESPONSE,

ahl.APPROVER_NAME

,AHL.CREATION_DATE REJECTION_DATE

,AHL.rowid

into

&INVOICE_NUM,

&CREATION_DATE,

&LAST_UPDATED_PERSON,

&LS_EMAIL_ADDRESS,

&WFAPPROVAL_STATUS,

&RESPONSE,

&APPROVER_NAME,

&REJECTION_DATE,

&rowid

FROM
AP_INVOICES_ALL AI

,AP_INV_APRVL_HIST_ALL ahl

WHERE 1=1

and ai.INVOICE_ID=ahl.INVOICE_ID

and ahl.RESPONSE='REJECT'

and ahl.rowid=:rowid

----------------------------------------------------------------------------------------------------------------------------------------

Then open Actions form.

Enter Action Name as Sending mail then go to Action set Details.

Note: Give &EMAIL_ADDRESS as value for email.so that the dynamic mail address is obtained with
respect to the User.

Text:
----------------------------------------------------------------------------------------------------------------------
Dear & LAST_UPDATED_PERSON,

The Invoice &INVOICE_NUM is rejected by &APPROVER_NAME on &REJECTION_DATE. Kindly take


necessary actions.

Regards

-----------------------------------------------------------------------------------------------------------------------------------

Then click on save and open action sets form

Enter Action set Name as Sending mail then go to Action set Details.

In Action set Details verify output parameters then go to members tab.

In members tab give Action as Sending mail, then click tab for 3 times and save.

Open Alert Details Form.

In Alert Details verify output parameters then go to installations tab.

Enter Operating Unit value.


Then save the alert.

This is alert is created to send mail to user who creates an Invoice and the Initializes it’s approval and is
received by another User .But, If the Invoice gets rejected by another User who receives the invoice for
approval.

Then the Email alert is sent to the user who created the invoice.

Following the message received by user.

You might also like