Home » Developer & Programmer » Forms » automail with updated field value in oracle forms (windows 7)
automail with updated field value in oracle forms [message #635150] Mon, 23 March 2015 04:12 Go to next message
Rockstar
Messages: 15
Registered: January 2012
Location: Udaipur
Junior Member
Hello guyz,
i have some requirement regarding oracle forms 10g....
Requirement:-
I want to send a mail to the authorisation when any field value changes on the oracle form when user press key commit.i also include all updated field values in mail body so that person can see which value changed on the form.

Pls suggest how can achieve this requirement.


Thanks in advance
Re: automail with updated field value in oracle forms [message #635162 is a reply to message #635150] Mon, 23 March 2015 09:36 Go to previous message
CraigB
Messages: 386
Registered: August 2014
Location: Utah, USA
Senior Member
This can be achieved in many ways. If you have to do your comparison in Forms, I think the most efficient would be to keep track of the records that have changed and their corresponding items. This method would require more code as you would need to create an array type construct (PL/SQL Table of Records, Collection, etc)to record the changes, but it would be faster in the long-run. Another option would be to check each row item during commit to compare its current value with the Get_Item_Property('ITEM_NAME',DATABASE_VALUE) to see if the value has changed. However, if I were implementing this, I think I would try to use a trigger on the corresponding table(s) so I could use the OLD and NEW values for comparison rather than keep track of changes in the form.

As to the email part, I don't recommend using OLE to Outlook to send the email, because the user could conceivably interrupt this process. The better option would be to send the email through the database using the UTL_HTTP or UTL_MAIL packages (depending on your database version). There are numerous examples on the Internet for sending email from the database.

Just my thoughts on a couple of ways I would try this. Others might have some good ideas too.

Craig...
Previous Topic: Overriding FRM-40654:Record has been updated by another user...
Next Topic: Forms 6i to 11g migration issue
Goto Forum:
  


Current Time: Mon Aug 03 16:21:51 CDT 2020