admin 發表於 2017-5-29 21:47:54

Custom Menu IFS8

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
      WHEREagreement_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;

https://open.ifsworld.com/_layouts/images/blank.gif
頁: [1]
查看完整版本: Custom Menu IFS8