設為首頁收藏本站

艾歐踢論壇

 找回密碼
 立即註冊

QQ登錄

只需一步,快速開始

搜索
熱搜: 活動 交友 discuz
查看: 876|回復: 0
打印 上一主題 下一主題

Custom Menu IFS8

[複製鏈接]
跳轉到指定樓層
樓主
發表於 2017-5-29 21:47:54 | 只看該作者 回帖獎勵 |倒序瀏覽 |閱讀模式
Custom Menu IFS8
How to write a Custom Menu in IFS8. According to the documentation "PLSQL Block Custom Menu Sample" it is advised to use code linke &AO. Purchase_Order_Approval_API.Au.....".
But when I use functions like &AO.Error_Sys.System_General it gives errors that the user has not the right to use functions like this. The same for the Transaction_SYS.Deferred_Call.
I can make it work by adding those function explicitely to permission set for those users, but that should not be the case in my opinion.
Also it is not clear which users can use the Custom Menu, there is no security option available on the custom menu?
Is is possible that someone can give a complete lecture on how to write advanced Custom Menu's with enabling/disabling the option,
using code without being afraid of writing code that must be tweaked in many ways to make it possible to use that code.
This is the code I'm trying to add to the custom menu:
DECLARE
   key_attr_    VARCHAR2(32000);

   CURSOR ca_ IS
      SELECT agreement_id, state
      FROM   &AO.customer_agreement
      WHERE  agreement_id = &agreement_id;
BEGIN
   FOR r_ IN ca_ LOOP
      IF r_.state = 'Active' THEN
         &AO.client_sys.clear_attr(key_attr_);
         &AO.client_sys.add_to_attr('AGREEMENT_ID', r_.agreement_id, key_attr_);
         &AO.client_sys.add_to_attr('REPL_ID', 'ALC_CUS_AGREEMENT', key_attr_);
         &AO.client_sys.add_to_attr('TRIGGER_TYPE', 'U', key_attr_);
         &AO.transaction_sys.deferred_call('Intface_Repl_Maint_Util_API.Replic_Automatic_Batch'
                                          ,key_attr_
                                          ,&AO.intface_header_api.get_description('ALC_CUS_AGREEMENT'));
         COMMIT;
      ELSE
         &AO.error_sys.system_general(' Agreement has wrong state: ' || r_.state);
      END IF;
   END LOOP;
END;


分享到:  QQ好友和群QQ好友和群 QQ空間QQ空間 騰訊微博騰訊微博 騰訊朋友騰訊朋友
收藏收藏 轉播轉播 分享分享 分享淘帖
回復

使用道具 舉報

您需要登錄後才可以回帖 登錄 | 立即註冊

本版積分規則

小黑屋|Archiver|手機版|艾歐踢創新工坊    

GMT+8, 2024-5-17 01:13 , Processed in 0.257630 second(s), 19 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回復 返回頂部 返回列表