cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to apply same sdk code to all transaction screens?

0 Likes
224

Hi,

Can anybody tell me, How to apply same sdk code to all transaction screens? I don't have any idea. I searched for it but couldn't get enough info.

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

{

BubbleEvent = true;

if ((pVal.FormType == 139 && pVal.EventType != SAPbouiCOM.BoEventTypes.et_FORM_UNLOAD) && pVal.Before_Action == true) {

oForm = Application.SBO_Application.Forms.GetFormByTypeAndCount(pVal.FormType, pVal.FormTypeCount);

if (pVal.EventType == SAPbouiCOM.BoEventTypes.et_FORM_LOAD && pVal.Before_Action == true)

Here form type = 139. So my code is applicable for this form only. but I want to apply same code to all tran. screens. Can we make form type generic? or Plz tell me any other way.

Thanks & Regards

Accepted Solutions (1)

Accepted Solutions (1)

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert

Hi nansz_22,

Use the OR condition like this:

if (pVal.FormType == 139 || pVal.FormType == 140 || pVal.FormType == 141)
{
}

Kind regards,

ANKIT CHAUHAN

SAP Business One Support

Answers (0)