I have two data Blocks Master & Child.
When a value is committed in Child Data Block, a flag will be set in the Master Table and is saved successfully.
But since the Master Block is not re queried after the Child Block's commit, value is not getting refreshed in the Master Block.
Which trigger should I use to re-query the Master on commit of the Child?
Any help on this will be appreciable.
The flag is set at the master table with an explicity update i think, based on your condition can't you to set it in the form itself so that forms will save both master and details and show your records properly
So After entering the data in child block and you are saving correct. Then some update happend in master table and then the data need to get freshed Correct.
Then you can use Execute query(); to refresh the block.
Can you provide some more info that how your are saving the data in child block. How many records in Master block, whether any particular record need to get refreshed at the time of saving the child record.
Yes, you have got it correct.
I have a flag in master table and which will be set to Y when an record is there in the Child Block.
So, after entering a record in the Child Block and on saving, the Child records will get saved and along with that we are updating the Flag to Y in the master table.
But in the UI, since the Master block has not yet been required, it will still show as N.
So, my requirement is just to re query the Master Block after a commit in the Child Block.
Master to child is One to Many relation.
Yeah, I got it I have to use Execute query(), but would like to know the apt trigger in which I have to place the code.
I have tried the below code in KEY-COMMIT trigger of Child Data Block, but still I am not able to to re query the form.
It throws the error "Please fill in selective criteria in at least one of the following fields for performance reasons: Name ..."
--set_block_property('VPF',ONETIME_WHERE,'VRBL_RT_PRFL_ID='||:VEP.VRBL_RT_PRFL_ID||' AND NAME='''||:VPF.NAME||'''');
Here VPF is the Parent and VEP is the Child.
I have even tried to set the ONETIME_WHERE clause and execute, but the error remains the same.