Committing Issue in Forms [message #356067] |
Wed, 29 October 2008 05:12 |
Vignesh.S
Messages: 2 Registered: October 2008
|
Junior Member |
|
|
Hi All,
I have Form A(Master Form) & Form B(Detail Form) (Oracle Dev suite 10 G)
Form A has an Copy button which inserts(DML Insert Statement)[!!!only insert & not commit !!!] an record in a table TABLE1 & Calls Form B with call_form statement (passing the newly inserted ID ) .
When the Form B gets launched it queries the same table (TABLE1) and shows the details of the copied record.
When the Form B is closed, the Form A gets back its focus, again querying the records from TABLE1
Requirement:
When the Form B gets opened with the copied record & when it is closed with out committing (Save button) it should ask for an question " Do you want to save the record ?" with Yes and No Buttons in it.
Problem:
When the Form B is closed with out committing its not asking for "Do you want to save the record ?" alert.
How do we achieve this kind of requirement ??? .
please let me know if you need more information to achieve this kind of requirement. Please help me to solve this as I am new to this technology.
workaround tried so far :
After querying the record in Form B , explicitly edit an item in a database block (like appending an space after an item).
Actual results:
When the Form B gets closed with out commiting its asking for "Do you want to save the record" ? message
When "Yes" is pressed the record gets committed which satisfies the requirement.
But the problem comes here When "No" is pressed then, the Form B gets closed , However, the uncommitted record (pressed No button in Form B)gets listed in Form A after executing the query.
Note: If the form A is relaunched, the same record is not getting listed. (the uncommitted record).
Thanks and let me know if you need more information to provide your insights!!
|
|
|
|
Re: Committing Issue in Forms [message #356085 is a reply to message #356071] |
Wed, 29 October 2008 07:44 |
Vignesh.S
Messages: 2 Registered: October 2008
|
Junior Member |
|
|
Hi,
Thanks for your reply!,
I don't want to delete the record which I opened in Form B, instead I don't want them to be saved in the TABLE-A.
More explanation:
The moment I pressed the copy button in Form A, a record is inserted in TABLE-A & the newly inserted ID is passed to Form B.
When Form B gets launched it just queries the details based upon the ID which Form A have sent & displays.
Note: At this moment, I haven't committed any thing!!!.
So at this point if I close the Form B with out saving it... it should obviously ask for "Do you want to save.....".
Let me know if you need more information.
With regards to your thoughts on executing query when the focus returns on Form A---- I am already doing this as mentioned earlier.
Thanks!
|
|
|
Re: Committing Issue in Forms [message #356246 is a reply to message #356085] |
Thu, 30 October 2008 01:31 |
|
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS Australia
|
Senior Member Account Moderator |
|
|
Why not just ask the question in the 'when-window-closed' trigger?
Why not use 'set_record_property(,status,changed_status)'?
David
|
|
|