I'm customizing a form in ORacle apps. I have created a button, when pressed does some calculation. I want this button to be disabled in query mode and enabled only for New/Insert/Change mode. The push button 'enable' property is set to NO. I have put a code in WHEN-NEW_ITEm_instance in the block trigger. The code is as follows.
-------------
declare
itemid Item;
begin
OE_LINE.When_New_Item_Instance;
itemid := Find_Item('LINE.ALLOWANCE_B');
IF :System.Record_Status IN ( 'NEW','CHANGED','INSERT') then
app_item_property.Set_Property(itemid,ENABLED,PROPERTY_ON);
end if;
IF :System.Record_Status = 'QUERY' then
app_item_property.Set_Property(itemid,ENABLED,PROPERTY_OFF);
end if;
end;
---------
Whenever I try to run the form & come on this block, it give me the error - Invalid item ID (FRM 41045).
I tried all means but all in vain.
Please help.
TIA
Raj
-------------
declare
itemid Item;
begin
OE_LINE.When_New_Item_Instance;
itemid := Find_Item('LINE.ALLOWANCE_B');
IF :System.Record_Status IN ( 'NEW','CHANGED','INSERT') then
app_item_property.Set_Property(itemid,ENABLED,PROPERTY_ON);
end if;
IF :System.Record_Status = 'QUERY' then
app_item_property.Set_Property(itemid,ENABLED,PROPERTY_OFF);
end if;
end;
---------
Whenever I try to run the form & come on this block, it give me the error - Invalid item ID (FRM 41045).
I tried all means but all in vain.
Please help.
TIA
Raj