Commit_form creating issue with When-New-Record-Instance trigger

Hello friends,
I am using Oracle forms 6i . I have a multi-data block. I have written commit_form in when-new-record-instance of the data block. When I launch the form on my instance the form does not open.
But when I comment out this code, the form opens on the instance. What could be the exact problem?
Also is there any condition that I can specify if the whole data block is null when I open the form?

Hi...
In When-New-Record-Instance, check if the block status is NEW. If Not, then just apply COMMIT_FORM;
try this code in your trigger
IF :SYSTEM.BLOCK_STATUS = 'CHANGED'
THEN
COMMIT_FORM;
END IF;
Should work for you.
Thanks....

Similar Messages

  • FRM-40735: WHEN-NEW-RECORD-INSTANCE trigger

    Hi Guys,
    Can someone help me to find the root cause of my follwoing issue
    Issue
    My Sales Order was giving following error when trying to open the form
    'FRM-40735: WHEN-NEW-RECORD-INSTANCE trigger '
    Bounced the instance the issue was resolved.
    Again today morning ,same issue started again after the daily bounce which is done bu a script.
    This time I bounced Form server and issue was resolved.
    Can someone help me in finding the root cause of this issue.
    This is issue is happening only on one form (Sales Order ) !!!!!
    Thanks

    Hi
    This is a Standard form using cusom.pll.
    This was working perfect for last 1 year.
    There where no changes made in the forms or in the environment.
    Only activity carried out was a rebooting of server.
    Surprising it is working fine after boucing!!!!
    any idea
    Thanks

  • FRM-40735: WHEN-NEW-RECORD-INSTANCE trigger raised unhandled exception

    I have a form that I migrated to 10g from 6i. I have no problems with it in 6i.
    When I launch this migrated form on the web in 10g, I get the following error:
    Error: FRM-40735: WHEN-NEW-RECORD-INSTANCE trigger raised unhandled exception ORA-03127From oracle error code
    03127, 00000, "no new operations allowed until the active operation ends"
    // *Cause: An attempt was made to execute a new operation before the active
    //         non-blocking operation completed or a new operation was attempted
    //         before all the pieces of a column were inserted or fetched.
    // *Action: Execute the new operation after the non-blocking operation
    //          completes. If piecewise binds/defines were done, execute the new
    //          operation after all the pieces have been inserted or fetched.What does the above suggested action mean?
    Any suggestions.
    Thanks

    Run the debugger and see what line of code is failing.

  • FRM-40735: WHEN-NEW-RECORD-INSTANCE trigger raised unhandled exception ORA-

    Hi,
    In R12 When trying to search existing users through Sysadmin or any other user ...we are getting the below errror...
    ORA-01403: no data found
    FRM-40735: WHEN-NEW-RECORD-INSTANCE trigger raised unhandled exception ORA-06510
    This error is not happening when we search for the SYSADMIN user....
    Any idea why this error happening...
    Also another error which is faced by users other than SYSADMIN is the below one when changing the responsability...
    APP-FND-01926---The custom event WHEN-RESPONSIBILITY-CHANGED raised unhandled exception:User Defined Exception
    Thanks
    Joseph
    Edited by: 783717 on Sep 27, 2010 10:49 PM

    Hi,
    In R12 When trying to search existing users through Sysadmin or any other user ...we are getting the below errror...
    ORA-01403: no data found
    FRM-40735: WHEN-NEW-RECORD-INSTANCE trigger raised unhandled exception ORA-06510
    This error is not happening when we search for the SYSADMIN user....
    Any idea why this error happening...What changes have been done recently?
    Please run AutoConfig and make sure it completes successfully.
    Also another error which is faced by users other than SYSADMIN is the below one when changing the responsability...
    APP-FND-01926---The custom event WHEN-RESPONSIBILITY-CHANGED raised unhandled exception:User Defined ExceptionCan you find any errors in the database log file?
    Please compile CUSTOM.pll (and other files) as per these docs and try again (as you are on R12 use frmcmp_batch.sh instead of f60gen).
    APP-FND-01926, ORA-06508 [ID 797242.1]
    APP-FND-01926: The custom event WHEN-LOGON-CHANGED raised unhandled exception: ORA-06508: PL/SQL: [ID 831159.1]
    APP-FND-01926 when logon changed ORA-06508 [ID 334295.1]
    Thanks,
    Hussein

  • When new record instance trigger at Fire Enter Query event is throwing erro

    HI
    I have the following code on when new record instance which is set to fire at Enter Query Mode
    IF :SYSTEM.BLOCK_STATUS <> 'QUERY' THEN
    rec_num:=Get_Block_Property( 'MASTER', CURRENT_RECORD);
    GO_ITEM('DETAIL.ITEM_NAME');
    CLEAR_BLOCK(NO_VALIDATE);
    GO_BLOCK('MASTER');
    GO_RECORD(rec_num);
    END IF;
    But this is throwing error when I am querying record on master block.
    It says 'Function not allowed.Please see a list of keys or functions'
    Thanks in advance.

    hi,
    GO_ITEM( ) procedure is resctricted procedure.It can not be used in Enter Query mode to navigate to an item in a different block.
    You can check wheter rest of the procedures are Enter Query Mode -Yes/No thourgh forms help window.
    Message was edited by:
    Manish.Sharma

  • How to populate automatically in a when-new-record-instance trigger?

    I have a form which displays around ten rows with about 5 columns. Whenever i will create a new record, i would like to place an initial value on the first column of every record. How do I do this? If I place the value in the properties of the item, it would be replicated on all the rows. What I want is to put a different value for each row created. But the problem is there is only one item property that i can put a value on (displayed 10 times). How do i put different initial values for each record created without creating new items for each record. is this possible? Thanks a lot

    Hi Navnit,
    Yes you are right, but it can work even we not plase quotation mark in it. But Yes I forget to place semi colon so now it is
    IF :System.Cursor_Record = 1 THEN
       :Block.Col1 := '02:00';
    ElsIF :System.Cursor_Record = 2 THEN
       :Block.Col1 := '07:00';
       ------and so on
    END IF;Danish

  • How to undo update of checkbox after triggering when-new-record-instance

    Hi,
    I am using eBusiness Forms Personalization in 11.5.10 to alter the Receipts form in Purchasing. I want to prevent users checking the rcv_transaction checkbox if the destination is "Multiple" and, instead, click the "+" sign to explode the multiple record into it's many component records.
    I can do this by invoking the when-new-record-instance trigger to make the "multiple" record fields unalterable and issue a warning message when the user selects such records. However, my problem is that - if the user clicks the checkbox as the first field in a "multiple" record, then this updates the checkbox to "Yes" BEFORE the trigger fires, which then locks the record for update.
    What I need is a solution that either sets the checkbox to unalterable for "multiple" records BEFORE the user clicks into such records, OR a method of undoing the update of the checkbox after the record has been selected (I cannot do this by simply setting it to "No" by the trigger as this is still technically an update and locks the record).
    Cheers
    Graham

    Hi Navnit,
    Yes you are right, but it can work even we not plase quotation mark in it. But Yes I forget to place semi colon so now it is
    IF :System.Cursor_Record = 1 THEN
       :Block.Col1 := '02:00';
    ElsIF :System.Cursor_Record = 2 THEN
       :Block.Col1 := '07:00';
       ------and so on
    END IF;Danish

  • How to discover which field was clicked in when-new-record-instance

    Suppose: a multi-record block. The user is positioned on an existing record on field A
    Action: user clicks on empty (new) record on field B
    Question: how can I discoverer that the user clicked on field B in the when-new-record-instance? Already tried :system.current_item and :system.trigger_item. They both contain 'field A'.
    Edited by: user473811 on 26-aug-2010 4:56

    That should work. What version of forms are you running?
    I tested it out on Forms 9.0.4 just to make sure and :system.current_field, :system.current_item, :system.cursor_field, and :system.cursor_item all bring back field B when I run the form in debug mode. Is there logic in your when-new-record-instance trigger that is taking you back to field A before you look at the :system variables?
    I would run the form in debug mode if I was you and break on the first thing in the WNRI trigger and just step through it looking at those system variables so you can see what it happening, but it should work unless you have some bugged up version of forms or are doing a go_item in the trigger back to field A.

  • When-new-record-instance

    Hi All !
    I have a form, where in
    *Trigger:when new form instance*
    enter_query;
    *Block level Trigger :when-new-record-instance*
    :empaply.employeeid:=:global.employeeid;
    select employee_id,firstname into :empaply.employeeid,:empaply.employeename
    from pim_emplpersonalinfo where employee_id =:global.employeeid;
    if :empaply.leavetype='Casual Leave' then
    :empaply.status1:='Not Applicable';
    :empaply.status2:='Not Applicable';
    :empaply.status:='Pending Approval';
    elsif :empaply.leavetype='Earn Leave' then
    :empaply.status1:='Pending Approval';
    :empaply.status2:='Pending Approval';
    :empaply.status:='Pending Approval';
    elsif :empaply.leavetype='Earn Leave' and :empaply.status='Rejected' then
    :empaply.status1:='Not Applicable';
    :empaply.status2:='Not Applicable';
    elsif :empaply.leavetype='Earn Leave' and :empaply.status1='Rejected' then
    :empaply.status2:='Not Applicable';
    end if;And for a push button
    *Trigger: when button pressed*
    execute_query;Now my issue is the initial value i have set in the new record instance is not working automatically, it works when i click any other text box in my form or when i scroll down..
    What can i down to overcome this?
    Pls help !
    Thanks and Regards
    user 10685325
    Edited by: user10685325 on Jun 22, 2009 1:19 AM

    Hai,
    The NEW-RECORD-INSTANCE Trigger will work only when the cursor moves to that record.
    write in the POST-QUERY Trigger of the block.
    Regards,
    Manu.
    If this answer is helpful or correct, please mark it. Thanks.

  • When-new-form-Instance trigger raised unhandled exception ORA-04062

    Hi,
    We are facing ORA-04062 (FRM-40735 WHEN-NEW-FORM-INSTANCE trigger raised unhandled exception ORA 04062) while trying to run the first form of our Application.
    We are using a PL/SQL LIBRARY(.pll) for forms.
    We are using 10G Application Server,10G DB and Oracle 9i Forms.
    DB Version----10.1.0.4.0
    Application Server--9.0.4.0
    During compilation, we are following the below steps:
    1. Compile the .pll
    2.Compile Forms.
    When we are running these compiled version of forms and pll in Development server where we are compiling it,we are not facing any error.
    But when we are taking these compiled version of forms and pll to the Production Server,we are getting the above error.
    When we are compiling the .pll in Production server, Application runs fine.
    But we should not compile form or pll in Production server.
    Searching in Metalink(Note:73506.1) , we find a solution that remote_dependency_mode if set to signature this problem may be resolved.
    We tried that by chaning ' REMOTE_DEPENDENCIES_MODE=SIGNATURE' in Init.ora file in both Production and Development server.
    But the error still persist.
    I think the problem is regarding .pll.Because for the time being to test the application,I compiled the pll in Production and we didnot get any error while running the Application.
    But whenever we are tring to deploy the compiled version of pll (compiling in Development sever) and to run the application in Production, we are facing the error.
    Also, pll calls one standard database package in SYS.That standard package has VALID status both in Production and in Development.
    We donot have priviledge to change/compile that package.So,we didnot change anything in that package. We didnot change anything in .pll also.
    We are upgrading our forms from 6i to 9i.And now when we are trying to deploy it to Production we are facing ORA-04062 error.
    Can anyone please help ?

    Exactly what procedure or package in SYS are you calling that causes this problem?
    <p>Are both test and production databases at the same version?
    <p>Do you know what procedure or package is named in the error? If not, then you need to improve your on-error trigger processing. I use a PLL_On_Error trigger to capture and improve a number of Oracle messages. It is posted here:
    <p> Re: FRM-40735:Pre_Insert trigger raised unhandled exception ORA-20011
    <p>Note especially the part near the end that deals with FRM-40735. (Not sure, but you may also want to display DBMS_ERROR_TEXT in your situation.)
    <p>If that doesn't help find the actual problem, I would pull out my Re: Zdebug -- Download a Forms debugging message tool, and add messages before every call in the when-new-form-instance process to zero-in on the offending call.
    <p>If it really IS a call to a system process, I would then experiment with creating a server-side package or stored procedure that calls the process, and then call that stored procedure from my form. That way, you effectively insulate your form from system differences.

  • Where's the WHEN-NEW-BLOCK-INSTANCE trigger gone?

    Not a rehash of my famous UKOUG presentation but a genuine question.
    If I start up a Form with ENTER_QUERY in the WHEN-NEW-FORM-INSTANCE trigger then WHEN-NEW-BLOCK-INSTANCE never fires. I just get a WHEN-NEW-RECORD-INSTANCE. This is true whether the query is executed or cancelled.
    I have replicated this behaviour inb both Forms 4.5 and 9i Forms so I assumed this is standard behaviour and well-known by everybody but me. The question is: why is Forms designed like this? I can just about see why WHEN-NEW-BLOCK-INSTANCE might not fire in QUERY-MODE, even though WHEN-NEW-RECORD-INSTANCE does, but why doesn't it fire after the query is executed or cancelled?
    Cheers, APC

    Interesting...
    I am aware that the when-new triggers do not run in some cases. On the other hand, the post- triggers run over and over again, to the point that I just don't use them because any code put there executes too many times.
    If you have several go_item or go_block triggers in a key trigger or when-button-pressed trigger, the when-new-item-instance trigger does not run each time you do a go_item. Instead, the when-new triggers ONLY run on the last item or block, just after my key-trigger code completes, and just before control returns to the user.
    So it would seem natural that if you go_block in a when_new_form_instance trigger, and execute an Enter_Query command, then the when-new-block-instance would not run.
    The fact that it does not run once you cancel the query just doesn't seem right, though.

  • FRM-40735: WHEN-NEW-FORM-INSTANCE trigger raised unhandled except ORA-06508

    Dear Colleague,
    I am migrating a Forms application from Forms 9i to Forms 10g. Most of my forms were originally created using the Oracle Designer Forms generator. I am also using the Webutil plugin. I just finished configuring Webutil, tested it and it seems to be working fine.
    I am able to compile all code and generate a Form executable. However at runtime, I get an error as soon as the first line of code in the WHEN-NEW-FORM-INSTANCE trigger.
    The error is:
    FRM-40735: WHEN-NEW-FORM-INSTANCE trigger raised unhandled exception ORA-06508
    and the beginning of the code is as follows. Using the debugger, I found out that the line:
    CGBS2$.SET_COORD_STYLE( 'P' );
    initiates an error.
    /* CGLY$INIT_CANVASES */
    /* Call procedure to ensure correct canvases are visible */
    BEGIN
    CGBS2$.SET_COORD_STYLE( 'P' );
    CGBS2$.SET_QRY_ON_ENTRY( 'Y' );
    CGBS2$.SET_NAV_FROM_BLOCK( 'PROJ_BLOCK' );
    CGLY$CANVAS_MANAGEMENT;
    END;
    Is the error telling me that this procedure was not found? How can I proceed to find the cause and solution of my problem? Are one of the Oracle Designer Forms Generator libraries missing?
    I would appreciate a tip to help me begin seeing the light at the end of the tunnel.
    Thanks and regards,
    Randy

    Randy,
    Glad I could help and you've got your Form running.
    @user9230833
    It is consider "bad form" to usurp another's post. Please create your own Forum post and include a link or links to any relevant posts. As to Randy's situation, he simply compiled the Forms 9i Library module (.pll) with Forms 10g's compiler. This may not be the cause of your error. When you post your own question, please include your Forms version (full version [eg; 10.1.2.0.2] not the release [6i, 9i, 10g, etc]). Also include any sample code that might help us help you! ;-)
    Craig....

  • FRM-40735: WHEN-NEW-BLOCK-INSTANCE trigger raised unhandled exception ORA-0

    I have created two control blocks.In the second control block an item is getting data depending on the value of a particular item in the 1st control block.
    I am fetching data for the item in 2nd block using WHEN-NEW-BLOCK-INSTANCE trigger in the 2nd block
    It is giving the following error
    FRM-40735: WHEN-NEW-BLOCK-INSTANCE trigger raised unhandled exception ORA-01403
    When I am giving the following code, it is working
    SELECT BM_MR_LCL_STD INTO :BLOCK2.ITEM5 FROM FABRIC_TYPE_MAST_DVLP WHERE FABRIC_TYPE = 'AT';
    But when I am giving the below code, it is not working,
    SELECT BM_MR_LCL_STD INTO :BLOCK2.ITEM5 FROM FABRIC_TYPE_MAST_DVLP WHERE FABRIC_TYPE = :BLOCK1.ITEM4;
    Please Help.
    Regards,

    That means there were no rows in the table which matched the criteria in your query. You need to trap the no_data_found exception, eg
    exception
      when no_data_found then
        :block2.item5 := null;
    end;and if fabric_type is not unique then you'll need to trap the too_many_rows exception too.
    I think for this you might be better off with an explicit cursor.

  • WHEN-NEW-FORM-INSTANCE trigger does not fire

    Hi,
    Does anyone have any idea why code placed in the when-new-form-instance trigger appears to be ignored when the form is executed from one login but runs fine when executed from another? A breakpoint on the first executable line of code in the trigger confirms that the trigger is not being fired.
    Regards,
    Ian Dodds.

    Hi again Duncan,
    I was able to solve it once I ran the form with the Forms Runtime Diagnostics enabled. I had a table in my schema containing old data used to build menu items. This was causing runtime errors to occur during calls to SET_MENU_ITEM_PROPERTY that were not being propagated to the UI so I didn't know they were occuring.
    The upshot was that the WHEN-NEW-FORM-INSTANCE trigger was not firing. Once I corrected the data it worked a treat.
    Thanks very much for pointing me towards FRD, it's the first time I've used it but it won't be the last.
    Cheers,
    Ian.

  • Populate two poplist items on when-new-form-instance trigger

    Hello!
    I have a simple form with some text-items, datetime items, two poplist items and two buttons (exit and save to database).
    Everything works well except the second poplist wont get populated. After wrote the code for the first i just wrote a similar one for the second poplist. Each poplist fetches its data from different tables. Nothing changed when i tried different list-item types (first worked, second didnt).
    Here is the code in the when-new-form-instance trigger:
    declare
         rg_query_sponsori varchar2(200) := 'select nume, sponsor_id from sponsori';
         rg_id_sponsori recordgroup;
         err_sponsori NUMBER:= 0;
    rg_query_portari varchar2(200) := 'select nume, portar_id from portari';
         rg_id_portari recordgroup;
         err_portari NUMBER:= 0;
    BEGIN
         rg_id_sponsori := create_group_from_query('recgrp1',rg_query_sponsori);
         err_sponsori := populate_group(rg_id_sponsori);
         clear_list('vizitatori.sponsor_id');
         populate_list('vizitatori.sponsor_id',rg_id_sponsori);
         rg_id_portari := create_group_from_query('recgrp2',rg_query_portari);
         err_portari := populate_group(rg_id_portari);
         clear_list('vizitatori.portar_id');
         populate_list('vizitatori.portar_id',rg_id_portari);
    END;
    Thx and have a nice weekend :)
    Iulian

    Try this by adding delete_group
    declare
    rg_query_sponsori varchar2(200) := 'select nume, sponsor_id from sponsori';
    rg_id_sponsori recordgroup;
    err_sponsori NUMBER:= 0;
    rg_query_portari varchar2(200) := 'select nume, portar_id from portari';
    rg_id_portari recordgroup;
    err_portari NUMBER:= 0;
    BEGIN
    rg_id_sponsori := Find_Group('recgrp1');
    if not id_null(rg_id_sponsori) then
    delete_group('recgrp1');
    end if;
    rg_id_sponsori := create_group_from_query('recgrp1',rg_query_sponsori);
    err_sponsori := populate_group(rg_id_sponsori);
    clear_list('vizitatori.sponsor_id');
    populate_list('vizitatori.sponsor_id',rg_id_sponsori);
    rg_id_portari := Find_Group('recgrp2');
    if not id_null(rg_id_portari) then
    delete_group('recgrp2');
    end if;
    rg_id_portari := create_group_from_query('recgrp2',rg_query_portari);
    err_portari := populate_group(rg_id_portari);
    clear_list('vizitatori.portar_id');
    populate_list('vizitatori.portar_id',rg_id_portari);
    END;

Maybe you are looking for

  • Aging report - detailed needs invoice project code

    Dear All, Would it be possible for us to have project code (on A/R invoice header) on Aging report - detailed print layout? I found all fields in Aging report - detailed PLD are sys var. Is there a way for us to figure out which sys var is for projec

  • Firefox crashes every few minutes. Reinstall, format, memtest ok, disk ok. No changes.

    My PC was working ok, but I decided to format it because it was time. I did it, and when I was using the recently installed firefox, it crashes. And did it again few minutes later, and again, and so on. Tried in deactivating Add-ons, deactivating Syn

  • Extra space adding during spool data into text file

    I'm using sql developer to query oracle tables. I can export data using GUI of sql developer, but I wish to use spool query to export the data. Using below query, I was able to export the data to specified location, but my final text file consist of

  • SE 3.0 Auto SmartFix

    Hi; I used the auto smart fix function on 1 photo and don't like the results. How do I "un-do" the fix? Thanks.

  • Please help ... Static on my MINI!

    I have the first generation mini and have had few problems with it. All of the sudden, yesterday, it was HORRIBLY full of static. I though that maybe it was my year and a half old headphones ... but, it appears to be with the mini itself. Has anyone