Forms--查詢後,關閉視窗會提示存檔


執行查詢功能後,如果在Post-Query內有將資料填入 Non-Database Item,此時Block_Status的狀態會是Change,

因此雖然沒有做任何更改或新增的動作,在關閉視窗時,會出現要求存檔的警告視窗。

此時可以在 Post-Query 內加上 set_item_property(, item_is_valid, property_true); ,

將所有的 Non-Database Item 都設定為 item_is_valid = true。


範例:

begin

  select segment1,description into :segment1,:item_description
        from mtl_system_items_b
        where organization_id=84 and inventory_item_id= :inventory_item_id;
    
   --解決 non-database item 在查詢後,其BLOCK_STATUS會變成CHANGE,以致關閉視窗都會提示存檔
  set_item_property('segment1', item_is_valid, property_true);
  set_item_property('item_description', item_is_valid, property_true);
end;

Windows 11安裝時跳過網路連線