on 03-27-2006 7:35 PM
Hi !
I'm using UDO and i would like to update manually some fields instead of the automatic Update with UDO's form ... Can i Catch this event and cancel the automatic updates to the table From UDO????
Thanks
Hi Alain
You should be able to catch the event in the itemevent. Try catching when the button is pressed (ItemPressed), obviuolsy before the action, then bubble the event.
Hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alain,
In your code you should get the event that was triggered and check whether it was the add button that was clicked. Then you do your code and then set the BubbleEvent parameter to false to not execute the standard processing of SAP Business One. Code sample:
If pVal.BeforeAction = True Then
If pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED Then
If pVal.ItemUID = "1" Then
oForm = oApplication.Forms.ActiveForm
...
'Do your code and saving
BubbleEvent = False
End If
End If
End If
Hope it helps,
Adele
Hi Alain
Adele is 100% correct as usual Use the sample code, it will work. But if i was you i'd rather let the UDO do the update. Do all the work just before the form is added (calculations) and place them on the form. Think about....hide fields (not visible or width -10) that are linked to the udo tables, catch the add button, freeze the form and make the changes and place the values in hidden fields, unfreeze once you are done. Like this the udo makes the changes.
Hope this helps
User | Count |
---|---|
95 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
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.