Skip to Content
0

Business Partner Catalog Numbers 'Update' event not triggered in first attempt.

Oct 12, 2017 at 11:54 AM

46

avatar image

While clicking 'Update' button first time in 'Business Partner Catalog Numbers' window, 'SBO_Application_FormDataEvent' is not triggered in the case of

BusinessObjectInfo.BeforeAction == false && BusinessObjectInfo.ActionSuccess == true.

First time only triggered the FormDataEvent , i mean 'BusinessObjectInfo.BeforeAction == true&& BusinessObjectInfo.ActionSuccess == false.'

But, i want to triggered the event BeforeAction==false and ActionSuccess==true case.

Please suggest me.

bp-catlogs.png (19.0 kB)
10 |10000 characters needed characters left characters exceeded

Hi All,

While clicking 'Update' button in Business Partner Catalog window for the first attempt, below event is not triggered.

if (BusinessObjectInfo.FormTypeEx == "993" && BusinessObjectInfo.Type == "73" && BusinessObjectInfo.BeforeAction == false && BusinessObjectInfo.ActionSuccess == true && BusinessObjectInfo.EventType == SAPbouiCOM.BoEventTypes.et_FORM_DATA_UPDATE)
{
//Inside logic
}

I'm looking for after ActionSuccess in SAP B1, i want to create a logic inside.

Please suggest me, if I'm missing anything.

Thanks,

Chenna

0
* Please Login or Register to Answer, Follow or Comment.

2 Answers

ANKIT CHAUHAN
Oct 12, 2017 at 12:46 PM
0

Hi,

If you want to write your logic after the data is added successfully, just use ActionSuccess== true.

If you want to write your logic before the data is added successfully, just use ActionSucess== false.

Kind regards,

ANKIT CHAUHAN

SAP SME Support

Show 5 Share
10 |10000 characters needed characters left characters exceeded

Hi ANKIT,

Thank you for yours prompt replay,

But, in my case this is not an issue,

I want to write a logic, after the data is added successfully in B1 site.

But In my case FormDataEvent is triggered one attempt only on first time clicking a Update button.

Thanks,

Chenna.

0

Hi,

Refer to SDK Sample "DataEvent" from the following location:

C:\Program Files (x86)\SAP\SAP Business One SDK\Samples\COM UI\CSharp\24.DataEvent

Also refer to attached image which is captured from the same sample project code, both the events are being executed.

Kind regards,

ANKIT CHAUHAN

SAP SME Support

dataevent.jpg (80.3 kB)
0

Hi Ankit,

Thank you for sharing screenshot.

But, my issue was bit different, While clicking of update button on Business Partner Catalog Numbers window, very first attempt 'SBO_Application_FormDataEvent' is triggered, but in the case of BusinessObjectInfo.ActionSuccess == false.

But i want to triggered the FormDataEvent, after the ActionSuccess true, i mean 'BusinessObjectInfo.ActionSuccess == true' case.

Thanks & Regards,

Chenna.

0

Hi Ankit,

I will explain very briefly,

Step 1: Click 'Business Partner Catalog Numbers' object (By clicking of object BP catalog window opened)

Step 2: In 'Items' tab write a complete item-code (which is already exist in database ex:'Item25') click Tab control in keyboard, by clicking tab control, Item-code related all data will filled automatically into 'BP catalog Window' with all details.

Step 3: Now, inside modify any data and click 'Update' button.
**Here, now check the 'FormDataEvents'

Please note down in this case 'FormDataEvent' triggered one time only.

Please find the below attached screenshot.

Thanks,

Chenna.

dataevents.png (9.4 kB)
0

Step 02 : Choose item code or write complete item code in items tab.

Step 03: Modify some data in the same window and click update button.

Now, please check the FormDataEvents,

Actually, I'm looking for ActionSucess==true.

step02.png (22.6 kB)
step03.png (31.8 kB)
0
Bhupendra Jadhav Oct 12, 2017 at 01:44 PM
0

OK

Understood, you want "ActionSuccess = True" condition and this is only possible when BeforeAction = False.

And you can try SBO_Application_ItemEvent to achieve that condition.

Regards

Bhupendra

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Dear Jadhav,

Thank you for your quick replay,

but, if i write the condition in SBO_Application_ItemEvent, pVal.EventType == SAPbouiCOM.BoEventTypes.et_FORM_DATA_UPDATE not triggered.

if (((pVal.FormType == 993 & pVal.EventType == SAPbouiCOM.BoEventTypes.et_FORM_DATA_UPDATE) & (pVal.Before_Action == false) & (pVal.ActionSuccess == true)))
{
}

Actual issue is, while clicking update button on Business Partner Catalog Numbers window, very first attempt SBO_Application_FormDataEvent is triggered, but in the case of BusinessObjectInfo.ActionSuccess == false.

But i want to triggered the FormDataEvent after the ActionSuccess true 'BusinessObjectInfo.ActionSuccess == true'

Regards,

Chenna

0