Skip to Content
author's profile photo Former Member
Former Member

ITem event not working on Installer

Hi ,

I have created one Add-on and it's catching the ItemEvent and FormDataEvent only when I am running through Visual Studio but it doesn't work when you create the executable file or install on SAP B1.

I am using 2005.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 20, 2007 at 05:50 AM

    hi

    samir,

    i think r u using wrong staqtment. so that u used this statment for item event\

    ...................................................

    SBO_Application.ItemEvent += new SAPbouiCOM._IApplicationEvents_ItemEventEventHandler( SBO_Application_ItemEvent );

    private void SBO_Application_ItemEvent( string FormUID, ref SAPbouiCOM.ItemEvent pVal, out bool BubbleEvent ) {

    BubbleEvent = true;

    if ( pVal.FormType != 0 ) {

    SAPbouiCOM.BoEventTypes EventEnum = 0;

    EventEnum = pVal.EventType;

    if ( ( EventEnum != SAPbouiCOM.BoEventTypes.et_FORM_ACTIVATE ) & ( EventEnum != SAPbouiCOM.BoEventTypes.et_FORM_LOAD ) ) {

    SBO_Application.MessageBox( "An " + EventEnum.ToString() + " has been sent by a form with the unique ID: " + FormUID, 1, "Ok", "", "" );

    }

    }

    .......................................................

    used this code ,

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 20, 2007 at 06:49 AM

    Hi Samir ,

    Would you explain your problem that what do you want in your Add-on....

    Kind Regards

    Yogesh

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      I want to use the FormDataEvent or capture this PickList number once you create the Pick list through Pick & Pack Manager.

      Issue:

      I have written my FormDataEvent and when I run this program from Visual studio then only this events get fire but if I create the executable of this events then it's not doing anything.

      below is my FormDataEvent

      public override void FormDataEvent(ref SAPbouiCOM.BusinessObjectInfo BusinessObjectInfo, out bool BubbleEvent)

      {

      BubbleEvent = true;

      _sbo.ShowMessage ("In");

      if(BusinessObjectInfo.BeforeAction == true)

      {

      _sbo.ShowMessage("Before Action");

      }

      // Pick List File Creation

      if((BusinessObjectInfo.FormTypeEx == "60020"))

      {

      _sbo.ShowMessage("60020");

      if (BusinessObjectInfo.EventType == SAPbouiCOM.BoEventTypes.et_FORM_DATA_ADD && BusinessObjectInfo.ActionSuccess && BusinessObjectInfo.Type.Equals("156"))

      {

      _sbo.ShowMessage("FormDataEvent Success");

      Oakton.SBOBusinessObjects.TestObject TestObject;

      // Create business object

      TestObject = new Oakton.SBOBusinessObjects.TestObject(_sbo.Company);

      //int iPickNo = 84699;

      int iPickNo = Convert.ToInt32(strPickNo);

      string strErrorMessage;

      bool bResult =TestObject.GeneratePickSlipTDXFile(iPickNo, out strErrorMessage);

      if (bResult==false)

      MessageBox.Show(strErrorMessage);

      else

      _sbo.ShowMessage("PickList OutBound File Created.");

      }

      }

      }

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.