FRM-40737: illegal restricted procedure COMMIT in POST-TEXT-ITEM trigger

Hi All,
I tried to execute an insert statement in a POST-TEXT-ITEM trigger and use commit to save data in the db but this error appeared:
FRM-40737: illegal restricted procedure COMMIT in POST-TEXT-ITEM trigger
How to solve it? OR how to save every text item value entered in the database?

I don't fully understand, why you need to insert records on post-text-item, but the possible solution is:
Write a DB procedure which does insert and commits it.
Call this procedure in post-text-item.
Problems will occur if your procedure is modifying the table columns, which are used in form. Form will notice that values in DB have changed and you will have "Record has been changed by another user. Please requery to see changes" error. But if records, affected by DB procedures, are not used in form, the wverything will be OK.

Similar Messages

  • FRM-40735: illegal restricted procedure COMMIT in POST-CHANGE trigger

    I am using forms6i. I have three text fields FL1 ,*FL2* , FL3 in a form. Cursor passes from FL1 to FL2 and FL2 to FL3. I want when cursor transfers from FL1 to FL2 the form should be saved(commit). On FL1 i put COMMIT; in post-change.
    But when I pressed Enter key on FL1 it gives following error message.
    FRM-40735: illegal restricted procedure COMMIT in POST-CHANGE trigger
    Can you help me doing this.

    Gul wrote:
    I am using forms6i. I have three text fields FL1 ,*FL2* , FL3 in a form. Cursor passes from FL1 to FL2 and FL2 to FL3. I want when cursor transfers from FL1 to FL2 the form should be saved(commit). On FL1 i put COMMIT; in post-change.
    But when I pressed Enter key on FL1 it gives following error message.
    FRM-40735: illegal restricted procedure COMMIT in POST-CHANGE trigger
    Can you help me doing this.You cannot use COMMIT_FORM in post-change trigger. Because post-change only accept UN-restricted procedure. and commit is not.
    try this
    /* Trigger KEY-NEXT-ITEM on every item and write sample code */
    commit_form;
    next_item;Hope this works..
    Hamid
    Mark correct/helpful to help others to get right answer(s).*

  • FRM-40737:illegal restricted procedure COMMIT in WHEN-VALID_RECORD trigger

    Hello,
    I added the following code in Custom.pll, Event procedure. When Internet Expenses responsibility is added to a user on the User form in System Administrator repsonsibility, his default account will be populated from costing. I received error, "FRM-40737:illegal restricted procedure COMMIT in WHEN-VALID_RECORD trigger",
    when enter Internet Expenses in the Responsibility field and tab. Even though the account was populated right, the responsibility is not able to save to the form.
    /* When the employee id given Internet Expense responsibility, create appropriate expense account for the employee from costing */
    if(event_name='WHEN-VALIDATE-RECORD') then
    if(form_name ='FNDSCAUS' and block_name ='USER_RESP') then
    p_responsibility_id := to_number(name_in('USER_RESP.RESPONSIBILITY_ID'));
    --p_responsibility_name := name_in('USER_RESP.RESPONSIBILITY_NAME');
    p_user_id := to_number(name_in('USER_RESP.USER_ID'));
    if (p_responsibility_id = 22918) then
    select employee_id
    into p_person_id
    from fnd_user
    where user_id = p_user_id;
    apps.cov_oie_pkg.update_emp_exp_act(p_person_id);
    commit;
    end if;
    end if;
    end if;
    Any suggestion will be highly appreciated!
    Yan

    You are calling 'COMMIT' after your custom package. You cannot use COMMIT in when-validate triggers. Did you try taking out COMMIT and save the record?

  • FRM:40737 Illegal restricted procedure ERASE in WHEN VALDATE-RECORD trigger

    Hi
    I am getting this error when I enter the Sales Order and try to save it sometimes.
    Can anyone please tell me how I can avoid this and what is the reason for this error?
    Sachin

    ok, then it is an apps problem.
    can you copy the question in the EBS-Forum ?
    General

  • ON-VALIDATE-ITEM 40737: Illegal restricted procedure COMMIT in WHEN-VALIDAT

    Dear All Expersts,
    In a form we want to update another table ON-VALIDATE-ITEM Or POST-UPDATE or POST-INSERT Event
    Could you please guide us can we do this without any error message i.e
    ON-VALIDATE-ITEM
    40737: Illegal restricted procedure COMMIT in WHEN-VALIDATE-ITEM trigger.
    Please guide.
    Thanks & Best Regards
    Eidy

    Eidy,
    Ok, for one thing, the Post-Update and Post-Insert triggers fire during the Post and Commit Transaction processing so it doesn't make any sense that you would attempt to issue a COMMIT in either of these triggers because it is already in the process of COMMITING.
    I think it would be best if you explain what it is you what to accomplish rather than how you are trying to accomplish the task. Then we will know why you are attempting a COMMIT (Restricted Built-in) in a When-Validate-Item trigger (will allows DML, Select, and Unrestricted calls).
    If you intent is to update/insert a record into a seperate table (say for auditing purposes) when a user changes a value in a different block (table) item - perhaps an After Update/Insert trigger on the database table would be a better option. This makes the secondary update/insert automatic and you don't have to code it in all of your forms.
    Again, like I said - if you tell us what you are trying to do, we can tell you if you are going about it the right way.
    @DanielB - All I can says is HUH?
    Craig...

  • FRM 40737: Illegal Restricted Procedure   in !!! HELPPP

    Hi:
    I have to use a program unit in Pre-Insert/ Pre-update triggers. That program unit calls some restricted built ins. Hence whenever I am using that program unit in validation triggers its giving
    FRM 40737 - Illegal restricted procedure FIRST_RECORD in PRE-INSERT/PRE-UPDATE
    Can somebody help.
    came to know that using timer can help. can somebody explain what is the alternative or how to use the timer in this case(if its of any help)?????
    thanks

    I don't fully understand, why you need to insert records on post-text-item, but the possible solution is:
    Write a DB procedure which does insert and commits it.
    Call this procedure in post-text-item.
    Problems will occur if your procedure is modifying the table columns, which are used in form. Form will notice that values in DB have changed and you will have "Record has been changed by another user. Please requery to see changes" error. But if records, affected by DB procedures, are not used in form, the wverything will be OK.

  • FRM-40737: Illegal restricted procedure (Ver 9.0.2.7.0)

    My form updates State code data. I get state from the from, perform query and populate the form myself. After the last field is entered I perform the update query, then a commit. This error is on the commit.
    Help!

    Jose,
    Some built-ins cannot be called during other processing (such as in the Pre- and Post- commit related triggers). All built-ins are labelled as "Restricted" or "Un-Restricted" This determines if they can be used when Forms is doing something else such as committing or executing a query.
    See the topic "Restricted Built-in Subprograms" in the help

  • Validation in POST-TEXT item trigger

    Hi
    Does POST-TEXT -ITEM trigger fire in ENTER-QUERY mode?
    If not suggest me solution for following scenario:
    I have supplier field in master block. When Form is in -ENER-QUERY mode, i want to validate the user input in the supplier field before user navigate out of the field using TAB KEY (KEY-NEXT-ITEM) or MOUSE (POST-TEXT-ITEM).
    Thanks
    Cheers
    Ram

    The Forms help says that it doesn't, and nor does when-validate-item.
    It looks like you'll have to use the when-new-item-instance trigger. You can store the value of the current field and whenever the trigger fires, run some code to validate that field. If it passes the validation then store the value of the new field, otherwise put the user back in the original field.
    You'll also need to call the code from the key-exeqry trigger, so that you can validate the field which the user is in when they execute the query.

  • Diffrence between when-validate-item and post-text-item trigger

    What is the Diffrence between when-validate-item and post-text-item trigger, when they are written for the same item and the basic diffrence between when-validate-item and post-text-item trigger.

    Two big differences:
    1. post-text-item is only available to, and only triggered when leaving a text item, whereas when-validate-item is triggered by the forms validation process, and is available for any item type.
    2. p-t-i is a navigation trigger and you cannot invoke it programmatically, whereas the 'validate' built-in can be used to execute validation which fires the w-v-i trigger(s).

  • Post Text Item Trigger

    I have a master block and a detail block, which is a multi
    record block; for one item in the detail block I created a post-
    text-item trigger to check if this value exists;
    the problem now is that this trigger not only fires if I leave
    the item, it also fires at the beginning when the canvas is
    dieplayed and I execute a query
    can anybody tell me why this happens and how to avoid it?
    thx in advance, michaela
    null

    Michaela (guest) wrote:
    : I have a master block and a detail block, which is a multi
    : record block; for one item in the detail block I created a
    post-
    : text-item trigger to check if this value exists;
    : the problem now is that this trigger not only fires if I leave
    : the item, it also fires at the beginning when the canvas is
    : dieplayed and I execute a query
    : can anybody tell me why this happens and how to avoid it?
    : thx in advance, michaela
    What happens in your form is perfectly normal.
    You should use the When-Validate-Item trigger, and, eventually,
    set the text-item required.
    null

  • Execute query when post text item

    Anybody can help ?
    I create 2 block, first a data block and another is a control block with field customer_search field,
    after inputing customer id in search field on control block,
    I want to execute query.
    my code :
    set_block_property('customer',default_where,'custid=:control.customer_search');
    execute_query;
    error : frm-407 : illegal restricted procedure execute_query in post-text-item trigger.
    How to solve this problem ?
    notes: If I create one push button and put execute_query in there, every thing is fine.
    but the my user does not like that.
    Thank.

    hi,
    first of all change ur statement as
    set_block_property('customer',default_where,'custid='||:control.customer_search);
    means u must use pipe sign while using bind variable
    secondly
    u should use key next item trigger
    go_block(user desired item or block);
    --and then use this satemant
    clear_block(no_validate);
    execute_query(no_validate);
    i hope it wil slove ur peoblem if it will NOT then please acknowledge otherwise we will go for a other solution
    thanks
    imran
    manager IT
    www.masoodtextile.com

  • Illegal restricted procedure Synchronize - error in webforms

    Hi All,
    When trying to open a webform (Oracle 9i/10g) with a field having synchronize built-in in the when-validate-item trigger, I am getting an error "Frm-40737:Illegal restricted procedure SYNCHRONIZE in WHEN-VALIDATE-ITEM trigger".
    Is Synchronize restricted procedure in webform (Oracle manual shows as unrestricted procedure)?
    This happens in some other forms while committing, but transaction is saved.
    Your suggestions on this will be highly appreciated.
    Gopalakrishnan.

    We had the same issue after converting from 6i to 10g. Sometimes 10g is blocking a SYNCHRONIZE in a WHEN-VALIDATE-ITEM as restricted. Forms 10g is wrong as SYNCHRONIZE is not (and has never been) a restricted built-in.
    I could never make it into a simple reproducable testcase to show to Oracle. In our case we could safely remove the SYNCHRONIZE built-ins from the code. Most of the times they were added in the past to workaround bugs in Forms 4.5 or 5.x.
    On MetaLink you can find a couple of bugs in Oracle Applications running into the same issue and they were also resolved by removing the call to SYNCHRONIZE. I also find bug 1577072 (open since 2001)
    If you need further assistance you'll probably have to log an iTAR at http://metalink.oracle.com

  • Go-item in post-text-item oracle forms 6i

    It is not possible to use go_item in post-text-item trigger in forms 6i
    How to overcome this?

    I've never tried to force the user to do that.
    But Kevin's second solution would do it:
    Set a packaged variable and put the code in a form-level WHEN-NEW-ITEM-INSTANCECreate a package specification in the form -- I always name such a package P0.
    In the package, create a variable:  Next_Itm  varchar2(60);In your post-text-item trigger, set the package value:    P0.Next_Itm := 'BLOCK_B2.ITEM_6';In the form-level when-new-item-instance trigger:
      If P0.Next_Itm is not null then
        Go_Item(P0.Next_Itm);
        P0.Next_Itm := null;
      End if;

  • FRM40737: Illegal restricted procedure SET_WINDOW_PROPERTY in...

    FRM40737: Illegal restricted procedure SET_WINDOW_PROPERTY in WHEN_VALIDATE_ITEM trigger
    the code inside my when-validate is as follows:
    declare
         button number;
    begin
    if :gse_packing_list_edit.carton_ref is null then
         button :=show_alert('carton_ref');
    else
    delete from A
    where
    PL_NO = :block.PL_NO AND
    CARTON_REF = :block.CARTON_REF AND
    ITEM = :block.ITEM;
    show_window('pop_up_window');
    go_block('pop_up');
    go_block('B');
    execute_query;
    end if;
    end;
    this was originally a code for a button that worked perfectly, when i decided that i would call the window automatically when text was entered in it.
    how can i do this now?

    thanks fro the reply francois
    but the bit that still puzzles me is the fact that oracle_forms gives me the feedback that im calling SET_WINDOW_PROPERTY
    since i'm not calling it directly, i am assuming that it is being called by something else in my code and the show_window(..) seems to be the one. Oracle documentation however tells me that this is a unrestricted procedure.
    anyways.... the go_item/block will cause a problem anyway.. I've heard about the timer thing.. but not too sure how to go about doing it..
    will appreciate your response in this regards
    thanks

  • I am getting frm :40737 because go_block

    Hello World,
    I have a form with master block and details , the detail block as a tabular.
    I want the detail block to track the changes on the master , like if the user updated on a particular item on the master the detail keep the username and date.
    i put the below code as a POST-TEXT-ITEM trigger on the item on the master
    DECLARE
    V_TOT_RECORD NUMBER := 1;
    V_COUNT NUMBER := 1;
    BEGIN
    V_TOT_RECORD := GET_BLOCK_PROPERTY('BLK2', QUERY_HITS);
    GO_BLOCK('BLK2');
    FIRST_RECORD;
    WHILE V_COUNT <= V_TOT_RECORD LOOP
    IF :BLK2.CFT_PROC_STATUS IS NULL THEN
         :blk2.cft_serial:=V_COUNT;
         :BLK2.CFT_PROC_STATUS:=:BLK1.CFU_STATUS;
         :BLK2.CFT_USER_ID:=:BLK1.CFU_USER_ID;
         :BLK2.CFT_DATE:=:BLK1.CFU_DATE;
    END IF ;
    IF V_COUNT = V_TOT_RECORD THEN
    EXIT;
    END IF;
    IF V_COUNT = V_TOT_RECORD THEN
    EXIT;
    ELSE
    NEXT_RECORD;
    END IF;
    V_COUNT := V_COUNT + 1;
    END LOOP;
    END;
    but i am getting this error
    FRM:40737 illegal restricted procedure GO_BLOCK in POST-TEXT-ITEM trigger.
    Help please

    but i am getting this errorFRM:40737 illegal restricted procedure GO_BLOCK in POST-TEXT-ITEM trigger.>
    Take a look at the Forms Help on the Post-Text-Item trigger to see which built-ins are allowed. Calling a Restricted built-in like GO_BLOCK in certain triggers could cause endless loops and other adverse side-affects. You could use a Zero (0) millisecond Timer to execute the restricted built-in(s) as this is a common work-around, but I would recommend you look into other alternatives to tracking these changes that don't required you to navigate between blocks.
    Why do you need to have the Detail block keep track of changes in the Master block? Also, it is always helpful to at least include your Forms version when asking a question. :)
    Craig...

Maybe you are looking for