You write the code in When-validate-record trigger in block level...dont use it in post-query..
hope this will help..
Hi. I am working on master-detail form.i want to disable my detail block field when execute.
--SET_ITEM_INSTANCE_PROPERTY('XXTT_KONTRAT_LINES_V.SS_NO', CURRENT_RECORD, enabled, PROPERTY_true);
You can't ENABLE or DISABLE an item in a multi-row block using the Set_Item_Instance_Property() built-in. Take a look at the Forms Help system on this built-in and you will find that you can only set the following properties using this built-in: BORDER_BEVEL, INSERT_ALLOWED, NAVIGABLE, REQUIRED, UPDATE_ALLOWED, and VISUAL_ATTRIBUTE.
In order to make a field in a multi-row block disabled, you have to emulate a disabled field. In other words, you can set the INSERT/UPDATE_ALLOWED properties as you are doing and I would recommend you also set the NAVIGABLE property to FALSE in your ELSE clause as well. If you need the field to appear as if it is disabled, then I recommend you create a set of visual attributes; one for a disabled field and one for an enabled field. Something like: DISABLED_FIELD and ENABLED_FIELD. Then you can use the Set_Item_Instance_Property() built-in to set the visual attribute in addition to the other properties you are setting. This will give the field the appearance that it is disabled.
Hope this helps.