on 02-08-2006 10:48 AM
Hi all!
Some idea about this?
In B1 2004A when I saved a customer order, Action_Success was TRUE only after the saving on B1 Company DB. Now (with B1 2005A SP:00 PL:07) Action_Success = TRUE immediately after the click on Saving button (pVal.ItemUID = 1).
I need to start my add-on only after saving customer order on B1 Company DB, also in B1 2005!
This is my VB.NET code:
Private Sub SBO_Application_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent
If pVal.FormType = "139" Then
Select Case pVal.EventType
Case SAPbouiCOM.BoEventTypes.et_FORM_LOAD
...
Case SAPbouiCOM.BoEventTypes.et_CLICK
...
End Select
If pVal.Action_Success = True And pVal.ItemUID = 1 And (pVal.FormMode = 2 Or pVal.FormMode = 3) Then
....
Hi,
try this:
Private Sub SBO_Application_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent
If pVal.FormType = "139" Then
Select Case pVal.EventType
Case SAPbouiCOM.BoEventTypes.et_FORM_LOAD
...
Case SAPbouiCOM.BoEventTypes.et_CLICK
...
End Select
If pVal.Action_Success = True And pVal.ItemUID = 1 And (pVal.FormMode = 2 Or pVal.FormMode = 3) Then
msgBox("Action_Success: " + CStr(Action_Success))
End If
End Sub
In is my code.
In B1 2004 messagebox appears after saving customer order and after clearing form.
In B1 2005 messagebox appears soon after clik save button.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I try your code whit this change:
MsgBox("Action_Success: " & CStr(pVal.Action_Success) & " " & pVal.EventType)
In SBO 2005 PL7:
I have two message, one for event 6 (et_CLICK) and other for event 1 (et_ITEM_PRESSED).
In SBO 2004:
I have only one message for event et_ITEM_PRESSED.
Is the diference between two versions, I think that you need to include this validation, The correct event is et_ITEM_PRESSED.
Best Regards.
Thanks David! So it runs, even if in 2004A there's some difference in add-on managing events, I beleve!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi David,
I know the ActionSuccess and BeforeAction are right, that is when one is true the other is false, but the difference between B1 20004A and B1 2005A is when ActionSuccess is set to true.
In B1 2004 ActionSuccess was set to true after:
- saving customer order (for istance) in B1,
- B1 cleared the form
Only at that moment ActionSuccess = True and the control returned to my add-on.
In B1 2005 ActionSuccess is set to true just after the click on save bottom.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi all,
I try whit this code:
If pVal.FormTypeEx = "139" And pVal.ItemUID = "1" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED Then
apl.MessageBox("Before: " & pVal.BeforeAction & " Action: " & pVal.ActionSuccess)
End If
And the system show two mesage:
Before: True Action: False
Before: False Action: True
I use SBO 2005 PL7, and I think that the system is OK.
Try to add in your conditions: BeforeAction = False.
Best Regards.
PD.- I use EventSpy 2004 and have acceptable results.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Adele, I just tried... but nothing
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Stefano,
Try using ActionSuccess instead of Action_Success. Action_Success is deprecated in 2004. Not sure if it will make any difference, but worth a try!
Hope it helps,
Adele
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
6 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.