Issue in firing of when-create-record trigger [message #570117] |
Mon, 05 November 2012 14:33 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](//www.gravatar.com/avatar/03f0c764c87e7f9703ff833e4cd64095?s=64&d=mm&r=g) |
Ora_Deeps
Messages: 17 Registered: June 2012 Location: San Francisco
|
Junior Member |
|
|
Hi,
I am navigating from a Master form to a child form. The when-create-trigger in the child form is sometimes executing and sometimes not. Not firing of this trigger is causing the child form to open without any initially assigned values. Please let me know the root cause and also the scenarios where the when-create-trigger fires.
Regards,
Deeps
|
|
|
|
|
|
|
Re: Issue in firing of when-create-record trigger [message #570198 is a reply to message #570159] |
Tue, 06 November 2012 12:52 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](//www.gravatar.com/avatar/03f0c764c87e7f9703ff833e4cd64095?s=64&d=mm&r=g) |
Ora_Deeps
Messages: 17 Registered: June 2012 Location: San Francisco
|
Junior Member |
|
|
Hi Littlefoot,
I had put the debug statement and when observed, ideally in the first time, in the goto_block (child form) call, 'when-create-record' trigger of the child_form fires and i see the values assigned. But if it does not fire, then the values are not assigned. In such scenario, for the second time when i try to access the child screen, the trigger fires. So it is not that the issue is observed always. If it does not work first time, it works surely for the second time.
Regards,
Pradeep
|
|
|
|
|
|
|
|
Re: Issue in firing of when-create-record trigger [message #570220 is a reply to message #570117] |
Tue, 06 November 2012 19:10 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](//www.gravatar.com/avatar/03f0c764c87e7f9703ff833e4cd64095?s=64&d=mm&r=g) |
Ora_Deeps
Messages: 17 Registered: June 2012 Location: San Francisco
|
Junior Member |
|
|
Hi Littlefoot,
In the master screen, inline with the below code, when debug statements are placed in the 'when-create-record' trigger, after the go_block('order_holds') for the ideal scenario, i see the focus getting on the 'when-create-record' trigger and see a debug message placed there. But for the other scenario where the Ids are not getting assigned, i donot see the 'when-create-record' trigger being fired and hence the Id values are not assigned.
Hope this helps.
go_block ('order_holds');
app_window.set_window_position ('ORDER_HOLDS','CENTER','MAINWINDOW');
set_block_property ('ORDER_HOLDS', DEFAULT_WHERE, ' HEADER_ID = :order.header_id AND ((LINE_ID IS NULL AND RELEASED_FLAG = ''Y'') OR LINE_ID = :oe_lines.line_id)');
|
|
|
Re: Issue in firing of when-create-record trigger [message #570225 is a reply to message #570220] |
Wed, 07 November 2012 00:23 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](/forum/images/custom_avatars/72104.gif) |
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Uh, oh ... EBS is Terra Incognita for me. Being here for quite a while now, I learnt that not everything I'm used to see in "pure" Forms works the same way when EBS is discussed.
It would be great if you were on 10g which contains a debugger, walking through all code lines executed, displays various information (block, item, system variables values and such) and it makes your life easier.
Anyway: this sentence:Quote:sometimes, the header Id & Line Number is not updated onto the 'Release Holds' screen and the reason i observed is that during such instances, the -W-C-R' trigger is not getting fired.
Can you isolate "such instances"? I don't really know how - maybe these instances have "A" in item NAME and "-5" in some other item, which causes code to fail. I noticed that "ELSIF p_event = 'WHEN-CREATE-RECORD' THEN" block you posted doesn't have an ELSE. So, maybe HOLD_CALLER parameter (in ":parameter.hold_caller = '<some_value>'") doesn't contain any value listed in IF-ELSIF so nothing happens?
|
|
|
|
Re: Issue in firing of when-create-record trigger [message #570298 is a reply to message #570295] |
Wed, 07 November 2012 12:49 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](/forum/images/custom_avatars/72104.gif) |
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
How about
go_block('order_holds');
last_record;
create_record;
The above code *should* force record creation, and the WHEN-CREATE-RECORD would, actually, fire.
However, I'm not sure that this is the right way. What does that trigger do, again? You said that you move from master to child records and that trigger "assigns" some values. If the starting point is a query you execute, which causes master AND child records to appear, maybe you should try with the POST-QUERY trigger (I mean, put your WHEN-CREATE-RECORD code into the POST-QUERY).
[Updated on: Wed, 07 November 2012 12:49] Report message to a moderator
|
|
|
Re: Issue in firing of when-create-record trigger [message #570300 is a reply to message #570298] |
Wed, 07 November 2012 14:45 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](//www.gravatar.com/avatar/03f0c764c87e7f9703ff833e4cd64095?s=64&d=mm&r=g) |
Ora_Deeps
Messages: 17 Registered: June 2012 Location: San Francisco
|
Junior Member |
|
|
Hi Littlefoot,
I added the WHEN-CREATE-RECORD code into WHEN-NEW-BLOCK-INSTANCE trigger since i wanted the data to be assigned as soon the focus enters the New Block. Functionality looks to be working!!! I need to do an exhaustive testing to ensure that no other function breaks.
Let me know if you have any suggestions.
Thanks a Ton!!!
Regards,
Pradeep
|
|
|