Raise form_trigger_failure not wokring on validate records

hi,
I wrotea block level trigger WHEN-VALIDATE-RECORD, which do some screen level validation and
in case of failure i use RAISE FORM_TRIGGER_FAILURE. working fine if i move records
another trigger is KEY-COMMIT on form level.
which calling a program unit where a command is FIRST_RECORD
now when i save the records using the save button
its call FIRST_RECORD, because of this command its executing WHEN-VALIDATE-ITEM
and execute RAISE FORM-TRIGGER-FAILURE
but system continue the executaion and jump back to key-commit triiger
why WHEN-VALIDATE-RECORDS 's raise is not working...
thanks

hi
its call FIRST_RECORD, because of this command its executing WHEN-VALIDATE-ITEM
another trigger is KEY-COMMIT on form level.
and execute RAISE FORM-TRIGGER-FAILURE
If when-validate-item trigger is not set at item-level plz set it at item-level and check.
set key-commit-trigger at block level.
may it helps u.
sarah

Similar Messages

  • Buitin RAISE FORM_TRIGGER_FAILURE not working in forms Personalization

    Hi,
    I create a SIT where i dn't want user to create more than 1 record. I successfully able to set the condition and popup error message in action tab when more than 1 record is entered by the user. Now I want to stop further processing and for that purpose I use built-in RAISE FORM_TRIGGER_FAILURE. But it won't work and user can able to process further easily.
    Can any one guide me how I acheive this using forms personalization?

    Pl see ML Doc 420518.1 on why this does not work
    HTH
    Srini

  • Raise Form_Trigger_Failure Not Working

    On my form I have a button. This button updates 3 base table items from it's when-button-pressed trigger.
    My problem is that when another user comes along and clicks the button for the same record before a previous user has committed their changes the following messages are displayed 3 times (once for each item that the button attempts to update fields?):
    1. Could not reserve record (2 tries). Keep trying?
    2. FRM-40501: ORACLE error: unable to reserve record for update or delete
    My desired result would be that these messages only appear once regardless of how many items the button attempts to update and that the form processing would be stopped after the first messages are displayed. This isn't happening.
    To try to accomplish this I am using an On-Error trigger to capture the FRM-40501 error message and instead display my own custom message followed by "Raise Form_Trigger_Failure".
    Despite the On-Error trigger displaying my custom message successfully, the "Raise Form_Trigger_Failure" doesn't seem to stop the form from processing the remaining code in the when-button-pressed trigger. These messages still appear multiple times in a row and the remainder of the when-button-pressed trigger code continues to run.
    So my question is why isn't my "Raise Form_Trigger_Failure" working to suppress subsequent messages? Is there a way I can address this?
    Any help would be greatly appreciated. Thanks.
    Edited by: sharpe on Jul 13, 2012 9:39 AM

    The FORM_TRIGGER_FAILURE in the ON-ERROR-trigger will not stop the code in your WHEN-BUTTON-PRESSED-trigger. Could you post the code from your trigger?

  • RAISE form_trigger_failure not working in purchase order form

    Hi,
    I am working on a customization in Purchase Order Form (poxpoepo)
    This is what I tried to do.
    CURSOR 1_cur IS
    SELECT pol.LINE_NUM v_line
    ,gcc.segment1 v_seg
    FROM gl_code_combinations gcc
    ,PO_DISTRIBUTIONS_ALL pod
    ,po_lines_all pol
    WHERE SUBSTR(gcc.SEGMENT1,1,1) = 'X'
    AND gcc.code_combination_id = pod.code_combination_id
    AND pod.PO_LINE_ID = pol.PO_LINE_ID
    AND pol.po_line_id = v_po_line
    AND pol.PO_HEADER_ID = v_po_header;
    CURSOR 2_cur IS
    SELECT pol.LINE_NUM v_line
    ,gcc.segment1 v_seg
    FROM gl_code_combinations gcc
    ,PO_DISTRIBUTIONS_ALL pod
    ,po_lines_all pol
    WHERE SUBSTR(gcc.SEGMENT1,1,1) = 'X'
    AND gcc.code_combination_id = pod.code_combination_id
    AND pod.PO_LINE_ID = pol.PO_LINE_ID
    AND pol.PO_HEADER_ID = v_po_header;
    BEGIN
    v_error_found := false ;
    IF (form_name = 'POXPOEPO' AND
    (block_name IN ('PO_LINES' ,
    'PO_SHIPMENTS',
    'PO_DISTRIBUTIONS') AND
    event_name = 'WHEN-NEW-ITEM-INSTANCE') OR
    (block_name = 'PO_HEADERS' AND
    event_name = 'WHEN-NEW-RECORD-INSTANCE' AND
    name_in('SYSTEM.BLOCK_STATUS') = 'QUERY' ) OR
    (block_name = 'PO_APPROVE' AND
    event_name = 'WHEN-NEW-BLOCK-INSTANCE' )
    ) AND
    NAME_IN('PO_LINES.PO_HEADER_ID') IS NOT NULL AND
    NAME_IN('PO_LINES.PO_LINE_ID') IS NOT NULL AND
    name_in('PO_LINES.LINE_NUM') >= 1 ) THEN
    v_po_header_id := NAME_IN('PO_LINES.PO_HEADER_ID');
    v_po_line_id := NAME_IN('PO_LINES.PO_LINE_ID');
    v_line_num := NAME_IN('PO_LINES.LINE_NUM');
    IF block_name in ('PO_LINES' , 'PO_SHIPMENTS', 'PO_DISTRIBUTIONS') THEN
    v_seg := null;
    FOR cursor1 in 1_cur
    LOOP
    if cursor1.v_seg = 'X' THEN
    v_seg := 'X';
    v_line_num := cursor1.v_line;
    EXIT;
    end if;
    END LOOP;
    ELSIF block_name in ('PO_HEADERS','PO_APPROVE') THEN
    FOR cursor2 in 2_cur
    LOOP
    if cursor2.v_seg = 'X' THEN
    v_seg := 'X';
    v_line_num := cursor2.v_line;
    EXIT;
    end if;
    END LOOP;
    END IF;
    IF v_seg = 'X' then
    fnd_message.set_string('custom message to be displayed.');
    FND_MESSAGE.ERROR;
    IF block_name = 'PO_APPROVE' THEN
    go_block('PO_HEADERS');
    raise form_trigger_failure;
    END IF;
    END IF;
    END IF;
    END;
    I actually want to achieve somewhat like this. When ever the charge account field start with 'X' or in other words if segment1 is 'X' and if changes are made to that line like note to supplier is changed and saved then the user should not be allowed to approve/reapprove the order and it shall pop up the message and ONLY restrict from going further if the user hits the APPROVE button. Highlighted in bold should have actually taken care of the requirement from proceeding to the next level of approval but it is not. I have had several debug messages and I am pretty sure that it is satisfying the condition of going to the PO_APPROVE block and still not raising form trigger failure. Could you please help me handle this scenario?

    Your Raise works -- it will terminate your procedure, Change_Detail_Block_Status.
    But, how are you calling the procedure? It is in THAT place that you should look for your problem.
    If you call the procedure, and then have coded EXCEPTION WHEN OTHERS THEN.... or something similar, you might be ignoring the "Raise FTF".
    In addition, you probably need to add these lines in your form where navigation or a commit or similar code causes a trigger to call your procedure:
    If not Form_Success then
    Raise Form_Trigger_Failure;
    End if;

  • Raise form_trigger_failure does not work in when-timer-expired trigger

    hi everbody,
    i create timer (no repeat) in when-validate-item trigger for an item then in timer i use raise form_trigger_failure for not posting related item.but raise form_trigger_failure not work in timer and cursor go next item ? do you say anything for that ? thanks..

    when your validation runs ok, then and only then you should create the timer and in the WTE you navigate to the other item.
    Think about: The WTE-trigger runs after the when-validate-item. It runs not within the WVI. That's the reason why you cannot cancel the WVI with the WTE.
    Only the WTE can be stopped with the Form_Trigger_Failure.

  • Exit / Clear Form & raise form_trigger_failure

    I hope someone has encountered a similar situation and can help me out here.
    I need to provide the functionality of allowing the user to Exit or Clear a form in case there are errors due to item validations.
    The problem I am encountering is that since the item validations have triggered form_trigger_failure, the Exit / Clear buttons that I coded with Exit_form / Clear_form do not work.
    I can have the user use the Exit key to exit, but it would be great if there is some way of providing this functionality using a button.
    Thanks in advance.

    Thileepan,
    Thanks for your suggestions.
    I am already using Clear_Form(No_Validate) and the fields are set to Required = No, validation being done in a when-validate-item trigger.
    I tried suggestion #3, but that results in the validation that takes place as the user leaves a field being lost, which they want(won't accept form level validation).
    Suggestion 4 works for the clear form, but if I don't raise form_trigger_failure in the when-validate-item trigger the validation error message is displayed and focus moves to the next field in case of user input error. What I want is to have the focus stay in the field containing the error and still give the user the ability to Exit/Clear the form in case they get tired of trying to come up with a value that satisfies the validation criteria.
    Thanks.

  • [10g] Raise form_trigger_failure in an inner block

    Hi,
    In a When-Validate_Item on a field,
    I have to issue a SELECT statement wich could stop the cursor in the field when the select return a flag value of 'NO'.
    So I created an inner block and if the test to 'NO' is true, I raise a form_trigger_failure.
    Also this inner block has an Exception section that tests NO_DATA_FOUND.
    Now when the flag is equal to 'NO', the When-Validate_Item continues without staying locked on the field.
    I tried adding an exception section to the outer block and enter this code:
    EXCEPTION
         when form_trigger_failure then
         raise form_trigger_failure;
    end;
    But it does not work.
    Could someone please help me blocking the cursor in that field?

    Is the 'raise form_trigger_failure' not working or is your 'query to test for 'NO' flag' not working.
    Your can display a message just before the raise form_trigger_failure to check if your test for 'NO' is actually working. Aslo check for the correct case, ie upper or lower, while testing the flag.
    (I think your EXCEPTION block is mistyped)

  • Raise form_trigger_failure is not working in multi-record block?

    raise form_trigger_failure is not working in multi-record block.
    Why?
    I am using Form 9i.
    Thanks and regards,
    Vikas

    Here is my code. Workorder_master is single block, workorder_dtls is multi-block.
    This code is written in KEY-NEXT-ITEM of labour_code in workorder_dtls.
    If suspended labour, invalid labour etc. is selected then it should not leave labour_code, but does not happen as I like. What will be the solution?
    DECLARE
    v_count                         NUMBER;
    v_status                    CHAR(1);
    v_workorder_no     VARCHAR2(15);
    v_pass_no                    VARCHAR2(15);
    v_rec_pos                    NUMBER;
    BEGIN
         IF :workorder_dtls.labour_code IS NOT NULL THEN
              v_rec_pos := :SYSTEM.CURSOR_RECORD;
              SELECT COUNT(*) INTO v_count FROM labour_master
                                  WHERE labour_code = :workorder_dtls.labour_code;
              IF v_count > 0 THEN --if labour exist.
                   SELECT status INTO v_status FROM labour_master
                                  WHERE labour_code = :workorder_dtls.labour_code;
                   IF v_status = 'I' THEN--'I' stands for busy.
                        --check if labour is for extension i.e. if labour is working for same workorder
                        SELECT COUNT(*) INTO v_count FROM workorder_dtls
                                            WHERE labour_code = :workorder_dtls.labour_code
                                            AND workorder_no = :workorder_dtls.workorder_no
                                            AND to_dt <= SYSDATE;
                        IF v_count > 0 THEN
                             --if working in same workorder then for extension, then give from_dt, to_dt
                             SELECT MAX(TO_DT)+1 INTO :workorder_dtls.from_dt FROM workorder_dtls
                                                 WHERE labour_code = :workorder_dtls.labour_code
                                                 AND workorder_no = :workorder_dtls.workorder_no
                                                 AND to_dt <= SYSDATE;
                        ELSE
                             --if not working in same workorder then give message.
                             SELECT workorder_no, pass_no INTO v_workorder_no, v_pass_no FROM workorder_dtls
                                                 WHERE labour_code = :workorder_dtls.labour_code
                                                 AND to_dt <= SYSDATE;
                             MESSAGE('This labour is already working through workorder no. '||v_workorder_no||' using pass '||v_pass_no);
                             MESSAGE('This labour is already working through workorder no. '||v_workorder_no||' using pass '||v_pass_no);
                             RAISE FORM_TRIGGER_FAILURE;
                        END IF;
                   ELSIF v_status = 'A' THEN--'A' stands for available.
                        :workorder_dtls.from_dt := SYSDATE;
                   ELSIF v_status = 'H' THEN--'H' stands for help-up.
                             SELECT workorder_no, pass_no INTO v_workorder_no, v_pass_no FROM workorder_dtls
                                                 WHERE labour_code = :workorder_dtls.labour_code
                                                 AND to_dt <= SYSDATE;
                        MESSAGE('This labour has been held-up for not submitting gatepass.');
                        MESSAGE('This labour has been held-up for not submitting gatepass.');
                        RAISE FORM_TRIGGER_FAILURE;
                   ELSIF v_status = 'S' THEN--'S' stands for suspend.
                             SELECT workorder_no, pass_no INTO v_workorder_no, v_pass_no FROM workorder_dtls
                                                 WHERE labour_code = :workorder_dtls.labour_code
                                                 AND to_dt <= SYSDATE;
                        MESSAGE('This labour has been suspended through workorder no. '||v_workorder_no||' using pass '||v_pass_no);
                        MESSAGE('This labour has been suspended through workorder no. '||v_workorder_no||' using pass '||v_pass_no);
                        RAISE FORM_TRIGGER_FAILURE;
                   END IF;
                   IF v_status IN ('A', 'I') THEN
                        :BLK_TEMP_WORKORDER.LABOUR_CODE := :WORKORDER_DTLS.LABOUR_CODE;     
                        GO_BLOCK('WORKORDER_DTLS_IMG');
                        EXECUTE_QUERY(NO_VALIDATE);      
                        GO_RECORD(v_rec_pos);
                        GO_ITEM('WORKORDER_DTLS.FROM_DT');
                        IF :workorder_dtls.from_dt + 180 <= :workorder_master.to_dt THEN
                             :workorder_dtls.to_dt := :workorder_dtls.from_dt + 180;
                        ELSE
                             :workorder_dtls.to_dt := :workorder_master.to_dt;
                        END IF;
                   END IF;
              ELSE --if labour does not exist.
                   MESSAGE('Invalid labour code');
                   RAISE FORM_TRIGGER_FAILURE;
              END IF;
         END IF;
    END;

  • RAISE FORM_TRIGGER_FAILURE is not working

    I am customizing a medical form with two blocks: cov_med_prem_header and cov_med_prem_lines. When user select emp_group from header, the list of medical program with end_date = '31-DEC-4712' will show at the detail block. Once a year at the open enrollment, HR will end date the previous year's program and enter the same programs but with different premium, also set the end_date = '31-DEC-4712'. In order to prevent user from enter to the wrong record, I added when-validate-record trigger for the detail block:
    declare
    max_effective_end_date DATE;
    begin
    select effective_end_date
    into max_effective_end_date
    from cov.cov_medical_premiums
    where emp_group = :cov_med_prem_header.emp_group
    and coverage_type = :cov_med_prem_lines.coverage_type
    and part_time = :cov_med_prem_lines.part_time
    and med_provider = :cov_med_prem_lines.med_provider
    and sysdate between effective_start_date and effective_end_date;
    if (:system.record_status = 'INSERT') and (max_effective_end_date = '31-DEC-4712') then
    MESSAGE ('YOU HAVE ENDTERED THE WRONG RECORD. PLEASE CHECK AND TRY AGAIN!');
    RAISE FORM_TRIGGER_FAILURE;
    end if;
    exception
    when others then null;
    end;
    But the RAISE FORM_TRIGGER_FAILURE is not working because the exception, but if I take out the exception part, I am not able to insert into the form, message like unhandled exception.
    Can anyone help with this? Thanks.

    Hi,
    There should not be an Exception part if you are using Form_Trigger_failure. So first find out what exception you are getting with the code, commenting out the raise form_trigger_failure. And first handle that, and then remove the exception part and use form_trigger _failure                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Form_trigger_failure in when-validate-record fired message three times

    Hello all,
    I have a problem with one of my forms. Indeed, I have used when-validate-record trigger to validate fields block.
    So, when user fills a duplicate I display an error message with two choices. Accept or proceed to change. The action button 1 is impeccable.
    But when the user clicks the button 2 of the message, I raise form_trigger_failure exception. What is strange is that my error message appears three times if I get out of the record by the mouse but once I get out of line by the tab.
    Is there someone who can help me on that?
    Please, find below the code that produce this result :
    IF :CTRL2.MATCH_REC > 1 then
         L_ALERT := SHOW_ALERT('ALERTE_1');
         IF L_ALERT = ALERT_BUTTON1 Then
    NULL;
         elsif L_ALERT = ALERT_BUTTON2 Then
         raise Form_trigger_failure;
         end IF;
    end IF;
    Thank you in advance

    Dear CraigB,
    Thank you for your answer but I still working without success.
    I found that the trigger W-V-R is fired thee times so the value of :CTRL2.MATCH_REC is recalculated every time (as shown by Kevin D Clarke about validating duplicate http://forums.oracle.com/forums/profile.jspa?userID=8905) witch is correct.
    If I affect 0 or null to :CTRL2.MATCH_REC, it's not raising finally the form_trigger_failure (F_T_F), so it's working has button 1.
    Note that I found after catching others exception (exception when others then...) a 100501 non-oracle exception.
    I don't know if my repetition is caused by this exception?
    Note again that, when I put other statement instead of raising F_T_F, it's working fine. His just only when I raise F_T_F that I have this behaviour.
    Do you have any idea ?
    Thanks in advance
    Edited by: pkn87897 on Oct 23, 2008 7:09 AM

  • Frm-40735: when validate record trigger raised unhandled exception ORA-0406

    while on production when i open any form and inserting some valeus after that when i want ot save the information it is showing me following error
    frm-40735: when validate record trigger raised unhandled exception ORA-04062

    ORA-04062: %s of string has been changed Cause: Attempt to execute a stored procedure to serve an RPC stub which specifies a timestamp or signature that is different from the current timestamp/signature of the procedure.
    Action: Recompile the caller in order to pick up the new timestamp >
    Check the When-Validate-Record trigger in your form and look for any calls to a database stored procedure. Then check the status of the database procedure to ensure it is "Valid." If the procedure is not valid - find out why and fix it.
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • Raise form_trigger_failure do not work

    Hi,
    I catch an error in on-error trigger and raise form_trigger_failure, this should be triggered when user clic <ok> button, that works, but in this screen user can go to menu and use another option that opens another screen, when user do that, the error message is displayed but form_trigger_failure do not raise and this another screen can be opened, does someone has any idea on how to fix it? Thanks.

    RAISED_FORM_TRIGGER_FAILURE will trigger only for the form whish has that command. So it will not failed when user navigate to anotyher form.
    What you want to do is if you get this message then poup a modal window and show the error. So at that time user unable to goto any other form because they can not navigate to any other window other than the modal window with the error
    Thanks
    * if this is correct/helpful then please mark it

  • When-validate-record trigger only if  a non database item is changed

    Hi,
    I am trying a code in the when-vaidate-record trigger in the BLOCK level.
    The trigger should fire only if a checkbox item value is ticked(Value ='Y) for the present record(i.e, if already existing other records have a value ticked (='Y), it doesnt matter and trigger shouldnt fire)
    Please help me achieve this :
    The code I have tried in when-vaidate-trigger, which does not work as what I want :
    DECLARE
    X NUMBER;
    BEGIN
    if
      nvl ( :DEFLOC.to_be_defaulted, 'N' ) = 'Y' and :DEFLOC.COMMENTS is NULL
      and :SYSTEM.RECORD_STATUS ='CHANGED'
         then
        set_alert_property(
             'err_alert',
             alert_message_text,
             'You must enter a comment when defaulting localities.');
              x := show_alert('err_alert');
              RAISE FORM_TRIGGER_FAILURE;
              end if;
    END;The above code does not fire at all..
    If I remove the part,
    and :SYSTEM.RECORD_STATUS ='CHANGED'
    it fires for "all records"(not just the currently changed records) where nvl ( :DEFLOC.to_be_defaulted, 'N' ) = 'Y' and :DEFLOC.COMMENTS is NULL
    Please help !!
    Note: :DEFLOC.to_be_defaulted is a non database item ; :DEFLOC.COMMENTS is a database item

    Hi kriti,
    There is one more way,
    In the when-checkbox-changed trigger,
    if :your_chk_box = 'Y' then
    set_Record_property(:system.cursor_Record, 'your_blk',status,changed_Status);
    else
    set_Record_property(:system.cursor_Record, 'your_blk',status,Query_Status);
    end if;
    Then it is easy for you to find out the changed records using get_Record_property((:system.cursor_Record, 'your_blk',status)
    Hey let me ask you one Question, is that check_box item is database item ???
    If so,
    it is easier..the fol. code will work for that
    if   nvl ( :DEFLOC.to_be_defaulted, 'N' ) = 'Y' and :DEFLOC.COMMENTS is NULL
      and nvl(get_item_property('DEFLOC.to_be_defaulted',database_value),'N') = 'N'      then
                      set_alert_property(
             'err_alert',
             alert_message_text,
             'You must enter a comment when defaulting localities.');
              x := show_alert('err_alert');
              RAISE FORM_TRIGGER_FAILURE;
              end if;otherwise
    If your are creating that temp. item, it should be in the same block as non-db item.
    I will explain this... You are setting the status of to_be_defaulted check box of some queried record to Y based on some conditions, right?
    These records anyways are not updateable. Now your requirement is to find out the newly checked check boxes.
    So in the post query or the place where you set to_be_defaulted as 'Y, we will default the new item with value Y, so that in the when validate trigger, you
    know which record needs to attacked, It is those records with nvl( new item ,'N') = 'N' and to_be_defaulted = 'Y'...
    Regards
    Dora...

  • Restricting User from creating new records using when-validate-record

    Hi,
    I have a requirement for which I have to restrict he user from creating a record in the Supplier Master form if the suppliier type is 'Affiliate Supplier'.
    I have done the following setups
    Seq 10
    Description Restricting user from creating Affiliate records
    Level Function
    Enabled Yes
    Condition:
    Trigger Event WHEN-VALIDATE-RECORD
    Trigger object VNDR
    Condition "${item.VNDR.VENDOR_TYPE_DISP_MIR.value} is NOT NULL
    and
    ${item.VNDR.VENDOR_TYPE_DISP_MIR.value} LIKE 'Affiliate%'
    Processing Mode BOTH
    Context
    Level User
    Value User Name
    Action Sequence 1
    Type Message
    Action Description Saving Affiliate record
    Language ALL
    Message Type Show
    Message Text You Cannot Create Affiliate records Here
    Action Sequence 2
    Type Builtin
    Action Description Stop Proceesing
    Language ALL
    Action Enabled Yes
    Builtin Type RAISE FORM_TRIGGER_FAILURE;
    This is working good on one instance but when I moved it to another instance
    when I query the form and try to navigate to the bank accounts tab of the form which is based on a differnt block i.e VNDR_USES block, the when-validate-record trigger fires there also and stops the processing.
    Any suggestions on this would be higly appriciated.
    Thanks in Advance.

    Hi Srini,
    Yes, it does work...but in a Form Session if i Create more then one Item, in some cases it fires for the first records and not sleeps for the second.
    Sometimes it doesn't give any response.
    Appreciated if you divert to the link to check the Pacthes for 11.5.10 on Form Personalization.
    Please share any ideas/example if yiou have to achieve the below requirement.
    Requirement:
    Once New record is created , a Custom Procedure should be invoked.
    with out closing Form i am able to create n number of Items, so for every Item it should invoke Custom PLSQL Code on Save.
    Let me know if i can achieve the same in Custom.pll .....as i can use either of Options.(Form Personalization/Custom.pll)
    Thanks & regards,
    Edited by: user632004 on Mar 16, 2010 7:50 PM
    Edited by: user632004 on Mar 16, 2010 8:09 PM

  • Form trigger failure in WHEN-VALIDATE-RECORD still saves data

    Hi, I have a WHEN-VALIDATE-RECORD trigger on one of my data blocks. When there is an problem with the data, I use RAISE FORM_TRIGGER_FAILURE. The error dialog appears, but it's still saving the data to the database!
    Here is the code for the WHEN-VALIDATE-RECORD trigger:
    -- WHEN-VALIDATE-RECORD Trigger for WTL_USERS Block in form MANAGE_ACCOUNTS
    DECLARE
         v_user_name VARCHAR2(10);
         v_alert_button NUMBER;
    BEGIN
              -- Check if this is the ADMIN account
              -- If it's a new account an error will occur - this is OK, nothing happens
              SELECT user_name
              INTO v_user_name
              FROM wtl_users
              WHERE user_id = :WTL_USERS.USER_ID;
         -- If this is the ADMIN account, you cannot disable it
         IF v_user_name = 'ADMIN' THEN
              -- Ensure that the ADMIN account has not been disabled
              IF :WTL_USERS.USER_ACTIVE = 'N' THEN
                   v_alert_button := SHOW_ALERT('ADMIN_ACTIVE_ALERT');
                   RAISE FORM_TRIGGER_FAILURE;
              ELSIF :WTL_USERS.USER_NAME != 'ADMIN' THEN
                   v_alert_button := SHOW_ALERT('ADMIN_NAME_ALERT');
                   RAISE FORM_TRIGGER_FAILURE;
              ELSIF :WTL_USERS.USER_ROLE != 'A' THEN
                   v_alert_button := SHOW_ALERT('ADMIN_ROLE_ALERT');
                   RAISE FORM_TRIGGER_FAILURE;
              END IF;
         END IF;
    EXCEPTION
         WHEN OTHERS THEN
              NULL;               
    END;
    What am I doing wrong?
    Thanks
    Adam

    Hello,
    Exception
      When form_trigger_failure Then
          Raise
      When others Then
    The when others exception trap all the exceptions including form_trigger_failure.
    Francois

Maybe you are looking for

  • My Mac is very, very slow

    Hi there, Need help. Have MacBook Pro for last 5 years. It has OS X 10.5.8, 2 GB RAM and 4 GB of free cpace on 80 GB HD. Recently it became very slow. I mean REALLY slow. Except for the web page that I can scroll up and down for everything else i see

  • MacBook Pro Retina 15.4, impossibilité de charger windows 8.1 à l'aide de lecteur de disque externe sur Mavericks. Boot Camp ne reconnais pas le disque. Quelqu'un à t'il la solution?

    sur MacBook Pro Retina 15.4, impossibilité de charger windows 8.1 à l'aide de lecteur de disque externe sur Mavericks. Boot Camp ne reconnais pas le disque. Quelqu'un à t'il la solution?

  • PI conceptual question

    Good afternoon: We are currenlty moving into SOA and we'd like to use Netweaver as our ESB but I have a conceptual question right now: - If my applications consume the web services provided or registered in the Services Registry, will I be using the

  • Eclipse and Jars

    Hello, I try to export myProject to an executeable jar in Eclipse structure the progect MyProject        src       images       data in src are java classes in image are images in data text fileby click on the created jar it happen nothing the progra

  • DMM 5.0 and DMP4400 problems

    Hi to all, we have a IPTV problem. Our infrastructure is this: -1 DMM 5.0 -10 DMP4400 -1 GALAXY Scientific Atlanta with terrestrial and satellite receiver -1 DCMd9900 encoder Scientific Atlanta We have no problem about rx signal, because we try with