COMMIT_FOARM IS NOT WORKING INSIDE THE  WHEN-MOUSE-CLICK

Dear friends
I have following script in when-mouse-click trigger
BEGIN
IF NOT Form_Success THEN
Bell;
RAISE Form_Trigger_Failure;
END IF;
IF :System.Form_Status = 'CHANGED' THEN
IF :LOCK_FLAG = 1 THEN
UPDATE PROJ.IM_REQUEST_HEADER
     SET LOCK_FLAG = 1
     WHERE DOC_CODE = :DOC_CODE ;
     SHOW_MESSAGE('DOCUMENT CODE -1'|| ' '||:DOC_CODE);
     SHOW_MESSAGE('LOCK FLAG -1'|| ' '||:LOCK_FLAG);
     Commit_Form;
     MESSAGE('The Record have been changed -1 ');
ELSE
     UPDATE PROJ.IM_REQUEST_HEADER
     SET LOCK_FLAG = 0
     WHERE DOC_CODE = :DOC_CODE ;
     Commit_Form;
     MESSAGE('The Record have been changed - 2');
END IF;
ELSIF :System.Form_Status <> 'QUERY' THEN
Message('An error prevented your changes from being
committed.');
Bell;
RAISE Form_Trigger_Failure;
END IF;
END;
Note :
The above trigger is attached to this field LOCK_FLAG and the item type of LOCK_FLAG is check box in the form and the property of the LOCK_FLAG
is site as the following :
database item = NO , and the property of the blcok IM_REQUEST_HEADER is site as the following :
database data block = NO
and my problem is when i change the value of LOCK_FLAG is not executting the update statement .
waiting for your valuable answer in details thank in advance for your cooperation.
best regards
jamil alshaibani

Dear Wilfred
Thank you very much for your cooperation, yes when I change the “Database data block “ property to no, it works, as I wanted to be.
Notes about my application:
In my program I provide the store keeper query screen, he can check the orders and lock the specific order by clicking on the LOCK_FLAG field, so after he locked the field the requester user can not change his order content if it is locked by the store keeper
And the way I was trying to do it ,by query the data from      IM_REQUEST_HEADER Table which is the Order table which is the header table ,the form is displaying doc_code ,doc_date ,lock_flag,and the order store name ,and I provide him a report on the same form that he can see the details of the order items ,and all the field properties set to no, that is update allowed to no ,insert allowed set to no, but the field lock_flag property set as update allowed to yes and insert allowed set to yes
and I would like to now how it was displaying this message
ORA-01400 cannot insert NULL INTO “PROJ”.IM_REQUEST_HEADER”.DOC_CODE
And I was not inserting, I was just updating the lock_flag by the above update statement.
Best regards
Jamil Alshaibani

Similar Messages

  • Cross-reference does not work inside the object states

    Hi All,
    I use InDesign CS5.5. I have four pages document. first three page has full for text and the fourth page has multi-state object. I am trying to insert the cross reference from the third page to the multi-state object (fourth multi-state object). when I export to SWF and click the cross-reference it does not got to the fourth state, but it goes to only on the first state. can any one help me how to add the cross-reference?
    I have tried on the other way. i have inserted the text anchor on the fourth multi-state object and tried to add cross-reference, still it does not work.
    am i doing something wrong or InDesign does not have this feature.
    please help.
    thanks.
    Regards
    Ramji V K

    @Ramji V K – Do we have a "terminology problem" here?
    Do you really mean a "Cross-Reference" or do you try to control the MultiStateObject (MSO) by a "Button" that does not work propperly?
    I did not do anything with the "Cross-Reference" feature yet, so I might be on the wrong trail…
    Uwe

  • BDC not working inside  the Workflow

    Hi,
    I created a BDC program and include it in the workflow as back ground task it not working .
    In the Business Object there it working fine. When I change it to foreground task in the workflow it working.
    If I declare as a  back ground it not working .
    Can you please tell me why this happening.
    Regards,
    Surjith

    Dear Sanjay,
    use BAPI "BAPI_MATERIAL_MAINTAINDATA_RT" or "MATERIAL_UPDATE_ALL_RETAIL" to manage Retail material.
    Gianluca

  • Color picker does not work, " program error when I click, photoshop cc

    I am user of photoshiop cc and it worked fine until several days ago but suddenly it shows " program error " when I click color picker, and I can not use changing color. Please help me to resolve this issue.

    There was a bug with photoshop CC concerning the color picker and its swatches. Make sure you have the latest version and then if it still exists, reset your tools in the upper left hand corner which would be the very first icon in the top tool bar. That should fix it. If not let us know and maybe someone can think of something else.

  • My "Restore Previous Session" button is not working anymore. When I click it, nothing happens. How can I fix this?

    When I click the "Restore Previous Session" button on my Firefox home page, nothing happens. It usually restores all of my tabs from the previous session, and now it does nothing.

    Hi cor-el
    After deleting the file, that bug is solved. HOORAY!
    But it seems like it crashes my About:Home page. Now, there's a blank box below the search bar and it is not responding. Can't use it to search etc.
    Does this happen to your FF?
    Thanks. Much appreciated.

  • When-Mouse-Click does not fire if When-new-item-instance exists

    We are using Forms 6i Patch 12.
    The When-Mouse-Click trigger (at block level) is not getting fired when a When-new-item-instance trigger exists on a given item on which mouse is clicked.
    We need to synchronize keyboard and mouse events such that if the validation on certain key items fails, the cursor should go to one of the specified items as per the validation rules.
    The validation rules are different on leaving from different items. Complex validation rules require cursor to go to a different item than the current item on which the validation fires.
    Since go_item cannot be used in when-validate-item, we are using a combination of key-next-item and when-mouse-click.
    But, this strategy seems to fail if mouse is clicked over an item having a when-new-item-instance trigger.
    Also, we need the When-mouse-click trigger to fire before When-new-item-instance.
    Any pointers to solving the firing of trigger or strategy will be appreciated!
    Regards,
    Sanjiv

    This solution we have tried and it works also.
    However, we end up in another problem in the form. For overall picture, please see my latest post for "Forms Valid status" at Forms Valid status
    Regards,
    Sanjiv

  • When-mouse-click trigger is not working

    Hi,
    My forms version is 10g.
    I've a black level and item level when-mouse-click trigger.
    There is some code inside that which is not being executed.
    To test, i simply printed a hello message inside the trigger's code.
    Even hello is not being displayed.
    Can anyone please help me in why this trigger is not working.
    Navnit

    You have some other issues going on if you don't see anything from a when-mouse-click trigger.
    First of all, are you spelling the trigger using a dash or underscore? WHEN-MOUSE-CLICK will run, but WHEN_MOUSE_CLICK will not.
    Have you set :SYSTEM.Message_Level to some value above zero in the form? If so, set it back to zero.
    On what object are you trying to click? Is this causing navigation? Navigation may cause validation to run, which may fail, which may prevent the navigation, which may prevent your when-mouse-click from running.
    And last, are you sure you are running the currently compiled fmx version of your form?
    When nothing works, you need to back up and start finding out what DOES work first.

  • Open Form not working when called from When-Mouse-Click

    In our application to navigate to other forms we have created a feature where user selects the Forms from a LOV, the form id is returned to the text item and user needs to click the text item.....In the text item the Open form command is given
    This is not working
    The form builder throws an error
    Frm 92100 Connection interupted
    what could be the reason

    Code written in When-Mouse-click
    for item :boo_toolblk.nbt_nxtscr which contains the form id
    DECLARE
    p_name_id PARAMLIST;
    lv_param_name VARCHAR2(8):= :boo_toolblk.nbt_nxtscr;
    lf_next_form_id FORMMODULE;
    BEGIN
    Clear_Item;
    /*Create a parameter list named 'TEMPLT_PARAM'. First
    ** make sure the list does not already exist, then
    ** attempt to create a new list*/
    IF not Id_Null(Get_Parameter_List('TEMPLT_PARAM'))/*Returns a BOOLEAN value if the object ID is available*/
    THEN Destroy_Parameter_List('TEMPLT_PARAM');
    END IF;
    p_name_id:= Create_Parameter_List('TEMPLT_PARAM');
    /*Add a value parameter to an existing Parameter
    ** List */
    Add_Parameter(p_name_id,'templt_nxtscr',TEXT_PARAMETER,lv_param_name);
    Go_Block(Get_Form_Property(:system.current_form,FIRST_NAVIGATION_BLOCK));
    lf_next_form_id := FIND_FORM(lv_param_name);
    :PARAMETER.next_form := lv_param_name;
    IF lf_next_form_id.id is not null
    THEN
    Close_form(lf_next_form_id);
    END IF;
    Add_parameter(p_name_id,'previous_form',TEXT_PARAMETER,:SYSTEM.CURRENT_FORM);
    /* opens another form*/
    Open_Form(lv_param_name,ACTIVATE,NO_SESSION,SHARE_LIBRARY_DATA,p_name_id);
    EXCEPTION
    WHEN FORM_TRIGGER_FAILURE
    THEN RAISE FORM_TRIGGER_FAILURE;
    WHEN OTHERS
    THEN RAISE FORM_TRIGGER_FAILURE;
    END;
    Error :-
    Frm-92100 : Your Connection to the Server was Interrupted
    This may be the result of a networn error or a failure on the server.
    You will need to re-establish

  • When a pdf file is opened in a tab, the automatic scroll function from the pad does not work in the other tabs, but only for the particular PDF tab.

    The scroll function from the pad/mouse does not work for the other tabs when a PDF file is opened.

    Hi NSHS,
    Have you checked to see if your PDF add-on is up to date? You should take a look at the [[Opening PDF files within Firefox]] Knowledge Base article. There is a lot of good information in there. You should try both of the suggested PDF add-ons to see if that fixes the issue.
    Hopefully this helps!

  • WHEN-MOUSE-CLICK for a display item does not fire on the web

    Resending as there were no responses............
    Regards,Bala.
    Bala (guest) wrote:
    : Hi guys,: 1. Does WHEN-MOUSE-CLICK fire on Display Item or on
    a Button in
    : Web Forms (not in a client/Server environment) ? We had it
    : working in Forms 5.0, but right now in 6.0 it doesnt ? In 6.0,
    : it works fine in Client/Server environment, but definitely not
    : in Web environment.
    : 2. Again, in our app. we have set no bevel for the display
    : items, but when we run it on the web, it comes with a bevel
    : (this does not happen in Client/Server). Is this common or is
    it
    : a known bug in 6.0 ?
    : 3. How to change Fonts for Web Deployment. Currently I guess
    it
    : takes Dialog as the default with the point size of 900 (in
    Java
    : terms). I tried modifying the registry.dat to the following:
    : default.fontMap.defaultFontname=SansSerif:
    default.fontMap.defaultSize=900: OR
    : default.fontMap.defaultFontname=Ms Sans Serif:
    default.fontMap.defaultSize=900
    : and found no changes at runtime on the Web.
    : Any help on these issues, will really be appreciated.
    : Thanks,
    : Bala
    null

    Dear friend
    i have the same problem when ever u can solve this probelm pls
    inform me as well mean while i am trying to reslove it as well if
    there is any sucess i ll inform u.
    mobeen
    Bala (guest) wrote:
    : Resending as there were no responses............
    : Regards,Bala.
    : Bala (guest) wrote:
    : : Hi guys,: 1. Does WHEN-MOUSE-CLICK fire on Display Item or on
    : a Button in
    : : Web Forms (not in a client/Server environment) ? We had it
    : : working in Forms 5.0, but right now in 6.0 it doesnt ? In
    6.0,
    : : it works fine in Client/Server environment, but definitely
    not
    : : in Web environment.
    : : 2. Again, in our app. we have set no bevel for the display
    : : items, but when we run it on the web, it comes with a bevel
    : : (this does not happen in Client/Server). Is this common or is
    : it
    : : a known bug in 6.0 ?
    : : 3. How to change Fonts for Web Deployment. Currently I guess
    : it
    : : takes Dialog as the default with the point size of 900 (in
    : Java
    : : terms). I tried modifying the registry.dat to the following:
    : : default.fontMap.defaultFontname=SansSerif:
    : default.fontMap.defaultSize=900: OR
    : : default.fontMap.defaultFontname=Ms Sans Serif:
    : default.fontMap.defaultSize=900
    : : and found no changes at runtime on the Web.
    : : Any help on these issues, will really be appreciated.
    : : Thanks,
    : : Bala
    null

  • TS1702 When I update to IOS6 on my 4S Facebook does not work properly, the news feed never updates it only says no new storeys and shows a picture of an antenna. When I reset my phone and go back to IOS5 Facebook works fine. What's up with IOS6 ????

    When I update my iPhone 4S to iOS six Facebook does not work properly the newsfeed doesn't load properly and I can never see what's going on all I see is a picture of an antenna and a little thing underneath it says no new stories when I reset my phone back to iOS 5 then it works just fine and I don't have any issues so there must be something wrong with iOS six that isn't letting Facebook load properly

    No I did not use any unauthorized methods for anything, I simply reset my phone back to factory.
    <Edited By Host>

  • Iphone 4: Home Button Not Working. The home button only works when it is connected to iTunes, once i disconnet it does not work, i have tried a restore to factory settings but it still is not working. Any suggestions?

    iphone 4: Home Button Not Working. The home button only works when it is connected to iTunes, once i disconnet it does not work, i have tried a restore to factory settings but it still is not working. Any suggestions?

    Apple, as I said, does not repair your iPhone. All hardware service issues are handled by replacing the unit. So they can't handle the home-button issue without also addressing the issue of the cracked screen, for which they'll almost certainly charge you. But you can make an appointment at an Apple Store or call Apple tech support and plead your case.
    Regards.

  • I get this error when I go to imovie, I have instalerat on via appstore, but it does not work. The QuickTime components necessary to view, edit, import and export various types of films are not installed. The components included in the iMovie installer. R

    I get this error when I go to imovie, I have instalerat on via appstore, but it does not work.
    The QuickTime components necessary to view, edit, import and export varioustypes of films are not installed. The components included in the iMovie installer.Reinstalling iMovie.

    I get this error when I go to imovie, I have instalerat on via appstore, but it does not work.
    The QuickTime components necessary to view, edit, import and export varioustypes of films are not installed. The components included in the iMovie installer.Reinstalling iMovie.

  • Macbook Pro 2011 DVI HDMI out does not work with TV when the power cable is connected

    My Macbook Pro (Early 2011) DVI HDMI out does not work with TV when the power cable is connected. If get the blue screen and then can use the macbook but nothing is displayed on the TV. If i go into display I can see that there are two screens but nothing displayed on the TV. If i take the power cable out at this point the TV shows the second desktop as expected. If i then reconnect the cable, the screen flickers, as though it is being affected by the power cable, and the screen goes blank on the TV. Only if i remove the DVI cable do i get the blue screen again. If i remove the power cable and reconnect it will do it every single time, so i cannot see it being a TV issue or a minor glitch.
    I have had this working previously but at the minute it seems to not be playing ball....any thoughts
    Thanks
    Dan

    BUMP
    Any ideas?

  • Keyboard plugs into the back of my display does not work? but when I plug the keyboard into my MacBook Pro it works fine? is it my display Monitor?

    My keyboard plugs into the back of my display monitor it does not work? but when I plug the keyboard into my MacBook Pro it works fine? is it my display Monitor?

    Try:
    - Resetting the iPod:
    Reset iPod touch:  Press and hold the On/Off Sleep/Wake button and the Home
    button at the same time for at least ten seconds, until the Apple logo appears.
    - Resetting network settings: Setting>General>Reset>Reset Network Settings

Maybe you are looking for