send email [message #149672] |
Fri, 02 December 2005 16:47 |
satchin
Messages: 24 Registered: September 2005
|
Junior Member |
|
|
hi all
i have to write a trigger which should send emails to the employees on their birthdays. how do i do it??. does anyone have the script for the trigger.. any help appreciated
thanx
satchin
[Updated on: Fri, 02 December 2005 16:48] Report message to a moderator
|
|
|
Re: send email [message #149700 is a reply to message #149672] |
Sat, 03 December 2005 00:47 |
adragnes
Messages: 241 Registered: February 2005 Location: Oslo, Norway
|
Senior Member |
|
|
Satchin,
You could use Oracle Alerts to do this. Oracle Alerts is a part of the E-Business Suite and allows you to define event and periodic alerts. You will want the latter. Basically you'll create a SQL statement that queries the PER_ALL_PEOPLE_F table for any active employees with a birthday today and then configure Oracle Alerts to send each of these an email congratulating them.
Instead of Oracle Alerts you could use Oracle Workflow to send a notification to the employee. In that case you would need to create a concurrent program that will run every night to find the employees with a birthday and raising a new custom business event, say xx.oracle.apps.per.event.employee.birthday, and then use the Business Event Manager to set up a subscription to the business event that sends the notification. Depending on you version of EBS you might need to define a workflow to do the actual sending of the notification.
There is also a third alternative, you could use the UTL_MAIL package to send the email directly from your concurrent program.
If you do not know Oracle Workflow and you do not have the time or wish to learn it, I would recommend using Oracle Alerts.
--
Aleksander Dragnes
|
|
|
Re: send email [message #150191 is a reply to message #149672] |
Tue, 06 December 2005 12:53 |
satchin
Messages: 24 Registered: September 2005
|
Junior Member |
|
|
hi adragnes
does that mean i dont have to use any trigger. if i have to use a trigger how do i go abt it??.
hope this is a reasonable question
thanx
satchin
|
|
|
|
Re: send email [message #150394 is a reply to message #150323] |
Wed, 07 December 2005 13:35 |
satchin
Messages: 24 Registered: September 2005
|
Junior Member |
|
|
hi adragnes
i have read somewhere " created triggers to send out emails on a specific date every month mentioning the status of the project ". how is the above stated done. can u explaing that with an example.
i have a second question. when two users are running two different concurrent programs for two different purposes at the sametime but the tables which are affected are same, what happens then?? is it right that the table/tables are locked and the program doesnt run. whats the solution for it if the tables are locked. any workaround??
thanx
satchin
|
|
|
|
Re: send email [message #150486 is a reply to message #150394] |
Thu, 08 December 2005 02:26 |
adragnes
Messages: 241 Registered: February 2005 Location: Oslo, Norway
|
Senior Member |
|
|
Satchin,
A trigger is an event that precipates other events. This is not what you are looking for. What you want is something that is periodic, every day, and not event based. In Oracle Alerts you would define a periodic alert for this. Please, take a look at the manual. Read the two first chapters and I think you will agree that it will do the job.
In my first reply I also outlined two alternatives. Both involve running concurrent programs daily to either launch a workflow to send a notification with the greetings or using a database package to send it directly from PL/SQL.
None of these involve you creating a database trigger, though the workflow alternative could involve you raising a "birthday event" in the concurrent program that will trigger a workflow.
What alternative to choose depends on among other things which of these mailers have been set up.
--
Aleksander Dragnes
|
|
|