Clear_All_Master_Details

i am populating my header & detail block with the help of a timer & works fine.
now lets say i query records, come upto the last record, press down arrow and then decide to create a new record.
i enter a value in a field and the header & detail block gets populated again for me.
now at this point i decide not to save & view previous record, form flashes the save message,
because the form status is changed.
now here, if i choose "No", form clears the detail block but NOT the header record and go back previous record.
as i notice that when i come to create new record again, the values of the previously unsaved header record still exists.
i fear to touch the system generated clear_all_master_details, but cant think how to solve this.
what i want is form should clear both the detail & the header records, in such a situation.
tyvm.

Catch the oracle message and show your own alert.
When the 'NO' button is pressed on your custom alert, execute code to go to the master block and do a clear_block.
Try not to "touch" system generated triggers or code, when you change properties the code could be re-generated.
I hope this helps...

Similar Messages

  • Navigation Problem in forms 10.1.2.0.2 !!!

    Hi All,
    when we create relation between master and child block then getting problem in navigation.
    i assume that you have form with two block with relation and data then execute query then
    start following step
    0) make sure you set required = true for first navigation item of child block
    1) you are in child block make some change on any item and make your cursor must not be on first navigation item.
    3) commit the form
    2) then click on master block and here make sure you are clicking on non current record.
    From
    Chirag Patel
    From
    Chirag Patel

    Thanks Frank,
    Yes Frank please follow the steps.
    this is error explanation :
    I have debug many times !!!
    actually it is not error but funny behaviour !!
    when you click on parent block on diffrent record then validataion trigger of first item of child block will fire. I do not why it is happening !!!
    I removed the validation trigger and did required=true for first navaigation item of child block then also it's behaving funny.
    This are the steps.
    1) create form with parent and child block and make relation ship
    2) insure that you put 2 record in parent and 2-2 recors in child for each parent record.
    3) insure that your first navigation item of child block has required property = true
    4) run your form fresh
    5) from parent bloc execute query ( I hope child block is populate some records)
    6) click on any record of child block and make changes
    7) then commit your form.
    now fun will start
    8) click on parent block on any record which has child records and non current record.
    9) then form should populate details for child instead of it behaves different as follows
    you will find FRM-40202 : Field must be entered
    your cussor will remian in child block;
    your record will not change in parent block.
    and child block will remail blank.
    by debugging I found that problem is coming from this code of <Clear_All_Master_Details> procedure
    -- Put cursor back where it started
    IF :System.Cursor_Item <> startitm THEN
    Go_Item(startitm);
    Check_Package_Failure;
    END IF;
    when I remove this line
    Go_Item(startitm);
    then my problem is solved
    But I do not know what is the other impact can be possible by removing this.
    Hello Frank
    I hope you will catch this error by this example.
    From
    Chirag Patel

  • ActiveX controls and clear_form

    If you use ActiveX controls in forms and issue a clear all from
    the menu, or a clear_form built-in, it will kill any ActiveX
    controls in the Form. Once I set a key_clear trigger to clear my
    master data block and used clear_all_master_details to flush all
    the data blocks in my form, leaving control block alone, my
    ActiveX controls stopped crashing.
    I didn't find this mentioned in the documentation, and thought
    someone might be able to save themselves some aggravation.
    null

    Hi,
    to have pure html controls in jspx, I have one idea, for example for < br > tag this is:
    < br xmlns="" / >
    It works, but I think with activex it's not so simple. I tried :
    ' <object xmlns="" id="ThermalLib" height="0" width="0" classid="clsid:904511D2-5407-4033-8DAD-07B33EC7317E"> '
    But it doesn't work.
    Did you solve this problem?
    Mayby somebody know how to launch activex from jspx?
    regards,
    basementjack

  • Master-details Relation In MultiBlock Form

    I have 3 Database block,A,B and C
    The relation exists A to B and B to C with 1 to many.
    I want to make a form without any non-database Block
    my problem is that - where I am adding first record(i.e. A, B,C) and moving to add 2nd record in B , it prompts 'Do u want to Save record ' . To avoid this message i used POST command in 'Clear_All_Master_Details' prorgam unit. and removed 'ASK_COMMIT' in clear_block function.
    It is working properly, but when 2 users are modifing to two different documents which belongs to A,B and C (i.e using same Form from different computer) it gets hanged untill unless the first user is not commitng or not clearing his form.
    I hope u must understand my proble.
    Please anybody can help in this topic.
    Thanks
    KM

    If the 'hanging' happens when users are modifying different records then the root of the problem is probably in a database trigger, updating or inserting the same record for each user. If you cannot redesign that then you'll need to implement a locking mechanism. For that, see DBMS_Lock.
    James.

  • Error "field required" in master-detail form with FORMS 10G!!

    I have a Master-Detail Form.
    When the cursor stay in detail block and i chage the master record with the mouse, clicking in scroll bar, i get error "field required".
    In Forms 6i, works fine!!

    Master block has more than one record displayed. When I click on any item in detail (except first one) and then click on different master record (return navigation to master block, but not current record) I have FRM-40202: Field must be entered on first item in detail block.
    I found that reason is this part of clear_all_master_details procedure (automatically created by Oracle Forms):
    IF :System.Cursor_Item <> startitm THEN
    Go_Item(startitm);
    Check_Package_Failure;
    END IF;
    Does any have same experience?
    Is it Oracle bug or I am missing something?

  • Cannot find pll

    All,
    I am trying to make a small change to a custom form in 11i environment.
    I am getting the below error when I try to open the form in forms builder:
    "FRM-10102: Cannot attach PL/SQL library QSCUST."
    However, I am able to open the form and compile it in forms builder without any issues.
    But, when I compile my form in UNIX box, I am getting the below errors:
    ----- BEGIN LOG----------
    FRM-18108: Failed to load the following objects.
    Source Module:APPSTAND
      Source Object: STANDARD_PC_AND_VA
    Source Module:APPSTAND
      Source Object: STANDARD_TOOLBAR
    Source Module:APPSTAND
      Source Object: STANDARD_CALENDAR
    Compiling package specification APP_CUSTOM...
       No compilation errors.
    Compiling package specification CANON_LOAN_ORDER_PKG...
       No compilation errors.
    Compiling package specification CANON_E216_LOANORDER_LINES_PKG...
       No compilation errors.
    Compiling package body APP_CUSTOM...
       No compilation errors.
    Compiling package body CANON_LOAN_ORDER_PKG...
    Compilation error on package body CANON_LOAN_ORDER_PKG:
    PL/SQL ERROR 49 at line 10, column 6
    bad bind variable 'parameter.G_query_find'
    PL/SQL ERROR 49 at line 10, column 6
    bad bind variable 'parameter.G_query_find'
    PL/SQL ERROR 49 at line 12, column 5
    bad bind variable 'parameter.G_query_find'
    PL/SQL ERROR 49 at line 27, column 9
    bad bind variable 'parameter.G_query_find'
    PL/SQL ERROR 49 at line 40, column 8
    bad bind variable 'parameter.G_query_find'
    Compiling procedure CHECK_PACKAGE_FAILURE...
       No compilation errors.
    Compiling procedure QUERY_MASTER_DETAILS...
       No compilation errors.
    Compiling procedure CLEAR_ALL_MASTER_DETAILS...
       No compilation errors.
    Compiling package body CANON_E216_LOANORDER_LINES_PKG...
       No compilation errors.
    Compilation errors have occurred.
    Form not created
    ---- END OF LOG-----------
    I have looked under au/xxxx/resource/
    But, I do not see any pll named QSCUST over there.
    Can someone please tell me what I am doing wrong here.
    Thanks.
    Message was edited by: 976511

    Are you using Developer 6i since you are on 11i?
    Please see the following docs.
    11i: Error Opening TEMPLATE.fmb in Forms Builder (Doc ID 236803.1)
    11i: How To Customize And Compile An Application Seeded Form (FMB) Or Library (PLL) (Doc ID 427879.1)
    PDE-PLI038 Cannot Open File For Use As A PL/SQL Library (Doc ID 862614.1)
    Thanks,
    Hussein

  • Do you want to save changes - appears twice in master-detail form.

    Hello.
    Sometimes ago i wanted "Do you want to save changes" message in my own language.
    So i created trigger:
    if :system.form_status IN ('CHANGED') then
         alert_response := show_alert('CHANGES');
         if alert_response = alert_button1 then
              commit_form;
         elsif alert_response = alert_button2 then
              clear_block(no_commit);
         elsif alert_response = alert_button3 then
              raise form_trigger_failure;
         end if;
    end if;
    I call that trigger in many other triggers like enter_query, ...
    Everything worked fine until i created form with master_detail block.
    The problem:
    I have a form with two blocks. One master, one detail.
    If i change something in detail block, go to master block item and press enter_query problem appears.
    First i get the message "Do you ..." in my language. When i press NO or CANCEL i get again the message "Do you ..." in original (english) language?
    Why is that?
    Should i call my trigger somewhere else and not just in enter_query trigger (for this problem) or is checking form_status not enough?
    Thanks.

    When you create relation, 3 procedures are automatically created for you.
    Check_Package_Failure, Clear_All_Master_Details and Query_Master_Details.
    When you execute clear_block(no_commit) on the master block -
    Clear_All_Master_Details will fire.
    If you check Clear_All_Master_Details you will find following code there:
    Go_Block(curblk);
    Check_Package_Failure;
    Clear_Block(ASK_COMMIT); -- This statement causing "Do you want to save changes" to appear

  • FRM-41106 You cannot create records without a parent record.

    Hello!
    Forms 6i.
    I have a Parent-Detail-Relationship. At the Detail-Block a "When-create-record" sets some default values on the Detail-Block.
    I got error "FRM-41106 You cannot create records without a parent record" when the Parent-Block executes a execute_query.
    I debuged the problem an found out, that the error appears in the standard-programunit "Clear_All_Master_Details".
    The error appears, when the code is deleting the detail-block "code: Clear_Block(NO_VALIDATE)".
    This is strange: The error appears only when I uses the "When-create-record"-trigger on the detail-block.
    If a comment out the trigger, no error appears.
    Why Is a "When-create-record"-trigger initiated when deleting the detail-block?
    Default-Code of "Clear_All_Master_Details":
    -- Clear all the detail blocks for this master without
    -- any further asking to commit.
    currel := Get_Block_Property(trigblk, FIRST_MASTER_RELATION);
    WHILE currel IS NOT NULL LOOP
    curdtl := Get_Relation_Property(currel, DETAIL_NAME);
    IF Get_Block_Property(curdtl, STATUS) <> 'NEW' THEN
    Go_Block(curdtl);
    Check_Package_Failure;
    Error appear here----> Clear_Block(NO_VALIDATE);
    IF :System.Block_Status <> 'NEW' THEN
    RAISE Form_Trigger_Failure;
    END IF;
    END IF;
    currel := Get_Relation_Property(currel, NEXT_MASTER_RELATION);
    END LOOP;
    Thx in advance,
    Wolfgang

    Wolfgang,
    To be honest, I've always done this kind of thing in the Pre-Inse rt or Pre-Upda te triggers. Why is it so important for the user to see the value of these field BEFORE the IN SERT or UPDAT E? Once the record is commited, they will see these values in your form. In my experience - users are typically satisfied with this approach. If your users are not OK with this approach, perhaps you could us a When-Validate-Record trigger instead of the When-Create-Record trigger.
    I think the When-Create-Record option would still work, but your code will need a little tweak. Give the following a try:
       IF ( NVL(:termin.best_nr,'MSTR') = NVL(:pos.best_nr,'DTL')
            AND NVL(:termin.best_jj,'MSTR') = NVL(:pos.best_jj,'DTL')
            AND NVL(:termin.best_pos,'MSTR') = NVL(:pos.best_pos,'DTL') ) THEN
           <<...set_values..>>
       END IF;Remember, NULL values do not always get evaluated correctly so it is always best to use the NVL function to ensure fields are evaluated correctly.
    BTW, you indicated that you ran DEBUG on your trigger, when your IF statement was evaluated did the "set_Values" section of your code run? If it didn't - do you have other code in your WCR trigger that is setting values outside of your IF statement?
    Craig...

  • Query on Co-ordination Operation -Go_Record

    I've a Master database block and it is having only one record.For the Master Block,Details block was created with the Co-ordination Property-Defered:NO and Automatic Query:NO.
    After using POST command,I'm using GO_BLOCK and GO_RECORD on master block in Key-Commit Trigger, at the time :system.form_status was in QUERY and Detail Block status was QUERY.
    Question:
    When i issue GO_RECORD on master block,ON-CLEAR-DETAILS trigger was getting fired and which inturn clears the detail block.
    My Understanding:
    Co-ordination Event should occur only when the event makes a different master record as the current record, in the Master Block.In my case I've only one master record so the GO_RECORD on master block to the same record should not cause Co-ordination Event to occur.
    Can any one help?
    Edited by: user13806434 on Jan 20, 2011 3:27 AM
    Edited by: user13806434 on Jan 20, 2011 4:59 AM

    Hi,
    Thanks.
    But..,
    This scenario was different. In Key-Commit trigger, I’m capturing the :System.Cursor_Record and :System.Cursor_Block to a variable inorder to store the current cursor placement at the time of commit and after doing all the validation on other blocks, I’m asking the system to go back to the same block using the value of the variable which has the initial cursor block and record value.
    When user keeps the cursor at the master block and does the commit, value of the variable will be the master block. So the GO_RECORD of master block clears the value in the detail blocks. If the cursor is on other than the master block, System does not clear the detail block.
    Here we can’t restrict user from placing the cursor and also GO_RECORD is used in *‘n’* number of places in the key-commit trigger based on many situation.
    My Questions:
    1)Will the GO_RECORD on master block will fire the Co-Ordination Event even if the master block has only one record?
    Also I’ve confirmed that the master block is having only one record by checking: SYSTEM.Last_Record value after the GO_RECORD statement.
    2)As I said: I'm Using the GO_RECORD of master block after the POST command, the Form Status and the Block Status of Master & Details
    block will be QUERY
    As the Block status was in Query, System does not re-query the record after the block is cleared.
    Below code is System generated code in CLEAR_ALL_MASTER_DETAILS
    currel := Get_Block_Property(trigblk, FIRST_MASTER_RELATION);
    WHILE currel IS NOT NULL LOOP
    curdtl := Get_Relation_Property(currel, DETAIL_NAME);
    IF Get_Block_Property(curdtl, STATUS) <> 'NEW' THEN
    Go_Block(curdtl);
    Check_Package_Failure;
    Clear_Block(NO_VALIDATE);
    IF :System.Block_Status <> 'NEW' THEN
    RAISE Form_Trigger_Failure;
    END IF;
    END IF;
    currel := Get_Relation_Property(currel, NEXT_MASTER_RELATION);
    END LOOP;
    As the Clear_Block(NO_VALIDATE); clears the detail block and the Block status is in Query so RAISE Form_Trigger_Failure is called.As the result the detail block was not populated after the clear block statement.
    Can u clarify me on this?.
    Edited by: user13806434 on Jan 20, 2011 5:02 AM
    Edited by: user13806434 on Jan 20, 2011 5:11 AM

  • Problem in implementing Master-Detail-Detail design in Forms 6i

    Hi, all technocrats!!
    Here i've problem in Master-Detail-Detail sort of design in
    Forms 6i..
    This thing i've implemented earlier in one form...and that is
    fine...and i could not track the root when i've got a problem in
    a new form...which of the same manner...
    The problem is that...
    When i enter data into the 1st detail block and navigate to the
    2nd detail which is a detail block to the 1st detail...and enter
    data, there is no problem, but when i navigate back to the 1st
    detail block and that to a new record in the 1st detail...form
    is showing indefinite behaviour( Hanging )...
    But when i navigate back to the same record in the 1st detail
    from the 2nd detail...there were no problems and it is working
    fine...
    And whenever i shift to a new record in the first detail it is
    asking to save that record...to solve this problem., i've used
    POST in the new block instance of the 1st detail...and i'm
    comfortably managing it...if i dont use this POST method...it is
    clearing the details in the 1st detail itself when i traverse
    back to it from 2nd detail after inserting records...
    But this hanging problem is really driving me to Hang myself...
    Plz do suggest me to get rid of this problem...

    Developing proper transactional behavior with Oracle Forms
    in Grandparent-Parent-Child case is a problem.
    We must use some 'container' for 'non-visible' Child records
    (Child records with Parent different from current record in
    Parent block).
    I try to solve this problem in 2 different ways:
    1. Using POST built-in. In this case 'container' is Child
    database table. But, problem can be because POST built-in
    actually executes DML statements (this locks records and fires
    database triggers - so a deadlock can occur) before COMMIT_FORM.
    2. Using a 'temporary container'. 'Temporary container' can be
    (for example) temporary database table, PL/SQL table of records
    (defined in Forms package or database package), Forms record
    group. This variant has not problem with record locks/database
    triggers, but is much more complex for programming than 1.
    variant.
    In my development, when I haven't problem with record locks or
    database triggers, then I use POST. In other cases, I use 2.
    variant, with PL/SQL table of records (defined in Forms package)
    as 'temporary container'.
    Further, when we use POST, we can do this in more ways.
    One method is to use POST in Forms level WHEN-NEW-RECORD-
    INSTANCE trigger.
    Different method is to change code in CLEAR_ALL_MASTER_DETAILS.
    Instead of:
    CLEAR_BLOCK (ASK_COMMIT);
    we can write:
    IF mastblk = "name_of_master_block" THEN
    CLEAR_BLOCK (ASK_COMMIT);
    ELSE
    POST;
    END IF;
    Which method you use?
    Regards
    Zlatko Sirotic

  • Long term future To Do Item appears now in To Do List

    I want to use To Do Items to schedule long term future activities, up to 5 years ahead (eg book medical checkups).
    I check the 'Due Date' box on the to do item then enter the date in the format set in 'International'
    This is Australian in my case eg dd/mm/yyyy
    The year seems to be treated as the current year by iCal, rather than a future year. The result is a February 2010 item appears in the To Do List to the right of the calendar when the 'Hide To Do Items with to do dates after calendar view' is checked. This is 2 years too soon!!
    Is this a bug or am I doing something wrong or is there a limit not described in iCal Help as to how far into the future the calendar works?

    When you create relation, 3 procedures are automatically created for you.
    Check_Package_Failure, Clear_All_Master_Details and Query_Master_Details.
    When you execute clear_block(no_commit) on the master block -
    Clear_All_Master_Details will fire.
    If you check Clear_All_Master_Details you will find following code there:
    Go_Block(curblk);
    Check_Package_Failure;
    Clear_Block(ASK_COMMIT); -- This statement causing "Do you want to save changes" to appear

Maybe you are looking for