This content has been marked as final. Show 3 replies
1 person found this helpful
I am not able get the record status in detail level.What have you tried? Can you prove a code sample? Also, what Forms version are you using?
Did you check the :SYSTEM.RECORD_STATUS variable? This system variable will give you the status of the current record.
Requirement:Here i need to get the record status in detail block level. If the record is in selected status it should perform query in detail block, else cursor should move to master block level.>
What do you mean by, +"If the record is in *selected* status..."?+ The values for RECORD_STATUS are: CHANGED, INSERT, NEW, and QUERY. I'm going to guess that when you say "selected" you mean "query".
I'm really not sure of what you are trying to do. It sounds like you are trying to synchronize a detail block with a master block. If so, this is what Block Relationships are for.
Can you please elaborate on what you are trying to accomplish?
Thanks for your quick reply.
I am using form 6i for my form development.
When i try to query the field first time in Master block level, it will fetch the data both Header Block and Details block. As well as cursor point will be in both Mater and Detail Blocks level.
When i try to query second time without selecting(Placing the cursor) any field in both blocks it is automatically querying Detail level Block (All Detail block records in read only mode).
But it should query Master Level Block. Detail block has to perform query only when we select (Place cursor) the record in Detail Block.
Answers for your questions:
Can you prove a code sample?:
I have used the below code in detail block level to move cursor from one block to in another block.
When new Block instance:
IF :SYSTEM.RECORD_STATUS = 'QUERY' THEN -- tried with 4 record status which you have provided
GO_BLOCK ('XX_INV_SERV_DEMA_STG'); -- XX_INV_SERV_DEMA_STG is the detail block name
GO_ITEM('XX_INV_ITEM_ELEMENTS_V.ITEM_NUMBER'); -- XX_INV_ITEM_ELEMENTS_V Master block name.
The above query is not working fine.
When i try to query second time it should perform in master level block. Not in detail level block.
Please reply for this requirement
Thanks in advance.
Edited by: 940598 on May 10, 2013 5:22 AM
When i try to query the field first time in Master block level, it will fetch the data both Header Block and Details block.How do you perform this query? Did you write code or are you using the Enter-Query/Execute-Query function keys?
When i try to query second time without selecting(Placing the cursor) any field in both blocks it is automatically querying Detail level Block (All Detail block records in read only mode).Again, how are you performing this second query (code or function key)?
If you have written code - is this just the code in your When-New-Block-Instance trigger or do you have another trigger as well?
If function key - then I would recommend you create a Module level Key-EntQry trigger that checks which block you are in and move the navigation cursor to the Master block before calling the Execute_Query() builtin.
Hope this helps.