I can't update my master-detail [message #215735] |
Tue, 23 January 2007 12:58 |
Smith_X
Messages: 56 Registered: January 2007
|
Member |
|
|
hello.. This question sound stupid but I need a lot of aspirin for now...
I design PR from which allow user to create a new PR (master-detail) and it's work well. Then, I create another PR form to allow user to "APPROVE" the pr. Due to I do not know how to limit user authenticated in item-level, so I do in form level instead.
In PR-Approve form, I have a LOV button for user to list the PR which have status "not approve" but when I try to click the LOV and start EXECUTE QUERY (in lov button) the form want me to make a change first. This problem came from I start in edit mode instead of query mode. So, I change my method to use "CURSOR" instead of EXECUTE_QUERY but the problem is I do not know how to set Oracle Form to update my data instead of insert the new one. Then, now I have problem about I try to insert data with the same Primary Key.
Actually, I want master and detail are executed query at the same time. I just want to update the document status. Maybe I do not permit user to add new data in this form, too. Could you please comment me what I should do?
(I also did the master-detail by Wizards and I think the relation is still function.)
Regards,
|
|
|
|
Re: I can't update my master-detail [message #215817 is a reply to message #215735] |
Wed, 24 January 2007 00:20 |
Smith_X
Messages: 56 Registered: January 2007
|
Member |
|
|
Code in when-button-press trigger
DECLARE
V_SUP BOOLEAN;
BEGIN
V_SUP := SHOW_LOV('LOV_PRNO');
--clear_block;
EXECUTE_QUERY(no_validate);
The problem that I face now is..
When I press LOV button. Oracle form ask me to save the change. I do not want this dialog. So, I use no_validate to turn the dialog off. Now, I can show master-detail data in my form but there is another priblem.
If I press LOV button again, the form pop-up alert about it cannot use records and already tried for 2 times. (Pop-up appear in local language, I'm not sure what's the original english one, sorry)
Now I struck with this problem. I do switch to use cursor but I think those cursor will use for insert new records of detail more than just change the status of master.
Please advice me.
|
|
|
|
Re: I can't update my master-detail [message #216135 is a reply to message #215735] |
Thu, 25 January 2007 03:57 |
Smith_X
Messages: 56 Registered: January 2007
|
Member |
|
|
Thanks very much for your reply, David.
Now I try your code and many of other mix of your code that I can..
I have another problem for now..
1. when I press the lov button. it'll lead me to enter_query mode but do not show the pop-up love at once. This issue is strange.
2. when I press the button again, it's pop-up the lov windows but when I choose the PRNO, it's pop-up the lov windows again (look like it's pop-up twice)
3. no matter how do I choose the value in lov windows, the return value will be the first value of PR number only. I do force validate on list in text item property, too.
Anybody had been ever face these kind of problems before please?
|
|
|
|