Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Event et_FORM_LOAD can not be catched by B1DE code.

I do some code on load a FORM from srf file and get trouble in catch the event for et_FORM_LOAD.

pls help to check my code and figure out my root cause:

(1) srf file

    <action type="add">
      <form appformnumber="-1"  
           FormType="-1" type="4" BorderStyle="4" 

(2) code for menu

    class PoExportMenus : B1XmlFormMenu
        private static readonly string FORM_XML_FILE = "PoExportForm.srf";
        private static readonly string MENU_UID = "Z_PUR_PoExportMenu";

        public PoExportMenus() : base()
            MenuUID = MENU_UID;

        [B1Listener(BoEventTypes.et_MENU_CLICK, false)]
        public virtual void OnAfterMenuClick(MenuEvent pVal)

(3) AddOn Form event process

    class PoExportForm : B1Form
        public PoExportForm() : base()
            this.FormType = "Z_PUR_PoExportForm";

        [B1Listener(BoEventTypes.et_FORM_LOAD, true)]
        public virtual bool OnBeforFormLoad(ItemEvent pVal) 
            SAPbouiCOM.Form oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            // ADD YOUR ACTION CODE HERE ...
            return true;

when I debug my AddOn code, I can not see a window popup the OK message.

Not what you were looking for? View more on this topic or Ask a question