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.

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.

How exactly do you navigate to a child ... hm, form? (Is it really a FORM or did you mean a BLOCK?) Where do you end up? In an existing record (by default, that would be the first record in a child block) or somewhere else?

Hi Littlefoot, Thanks for your replies.
In EBS, under the Order Acceptance screen, in the Lines tab, when i click onto the 'H' column, it takes to 'Release Holds' screen. Here, 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.
Code gives call to procedure - order_holds_pkg.event ('WHEN-CREATE-RECORD');
Below is the details of the Program Unit associated.

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.

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?

Hi LittleFoot,
I really appreciate your suggestions.
Inside the When-Create-Record trigger is the call to function order_holds_pkg.event ('WHEN-CREATE-RECORD'); This Program Unit in turn evaluates :parameter.hold_caller and processes accordingly. Here since the call to When-Create-Record trigger is not happening, the code you are referring is not getting executed.
My main query is that when the go_block('order_holds'), the When-Create-Record trigger is not fired sometimes.

As FYI,
'When-Create-Record' trigger Perform an action whenever Form Builder attempts to create a new record in a block. So i see here that the new record creation is not happening sometimes.

Also could you suggest any other Trigger where i can duplicate the When-Create-Record trigger functionality so that Trigger executes atleast once.

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).

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.