I’m attempting to write down a set off as beneath. I must additional modify it in order that it runs sequentially.
i.e. When a difficulty is raised in associated dept, it passes via a number of approval ranges.
So beneath code is w.r.t. to 1 approval stage.
I’m attempting to write down code in order that for first stage, mail goes to all individuals with p.approver -‘Approver 1′.
The when permitted =’Y’ from all of the individuals in utility, i.e. each X and Y who’re Approver 1 set Accredited button as Y logging in individually,(it’s apex app).
Then e-mail would shoot to subsequent Approver 2 and so forth.
So might you please recommend methods i might make this set off dynamic in order that e-mail is triggered from Approver 1…n for particualr dept.
CREATE OR REPLACE EDITIONABLE TRIGGER "P_IT_ISSUES_AIU_Notify_Approver_1" AFTER insert on P_IT_ISSUES for every row FOLLOWS P_IT_ISSUES_AIU_EMAIL start For c1 in( choose p.person_id ,p.person_email,i.dept_name from p_it_people p,p_it_departments i the place p.assigned_dept=i.dept_id and that i.dept_id=:new.related_dept_id and p.approver='Approver 1') --should develop into incremental i.e. Approver 1..n Loop APEX_MAIL.SEND( p_to => c1.e-mail, p_from => c1.e-mail, p_body => 'You may have been assigned a brand new difficulty for first stage approval. ' ||chr(10)|| ' The main points are as follows ::: ' ||chr(10)|| chr(10)|| ' Division:'|| c1.dept_name ||chr(10)|| ' Abstract: '||:new.issue_summary ||chr(10)|| ' Standing: '||:new.standing ||chr(10)|| ' Precedence: '||nvl(:new.precedence,'-'), p_subj => 'New Challenge for nth Degree Approval'); Finish loop; finish;
Trying ahead to your assist.