on 06-07-2006 12:23 PM
Hi,
I've deactivated several fields on a system form, but when I browse the records the fields apear for a few moments and disapear afterwards.
Is it possible to eliminate this delay when browsing the records so that the fields never apear?
For browsing the records I catch the ItemEvent et_ITEM_PRESSED.
I've tried several possibilities but the delay is always there!
I'm using SBO 2005A SP:00 PL:04.
Thankx,
Vítor.
Vitor yes I think you should pack that on an XML. And attach the load of the XML also at all the UI events that seems to revert back your changes.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you use UI API calls ? I mean: did you loop on the items and set the property Visible to false ? if this is the case you maybe could consider packing all these instructions in an XML containing an update action and execute it with LoadBatchActions. B1 SDK documentation contains all the details for this.
A technical note:
When you call UI API you are in reality using COM proxies and then your call is in reality executed in a different address space, the B1 desktop one. That could cause delay due to the load of all the IPC, and then the flickering. With XML this communication is batched and your loop in moved into the B1 desktop address space.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gianluigi,
Yes, I'm using UI API calls.
Here is my code:
Private Sub SBO_Application_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent
'Form 134 = BP Master Data
If pVal.FormType = 134 Then
If pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_LOAD Or pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED Then
oForm = SBO_Application.Forms.GetFormByTypeAndCount(pVal.FormType, pVal.FormTypeCount)
'Deactivate fields from form:
'IDno. 2
oForm.Items.Item("114").Visible() = False
oForm.Items.Item("113").Visible() = False
'Unified Federal Tax ID
oForm.Items.Item("62").Visible() = False
oForm.Items.Item("73").Visible() = False
'Sales Employee
oForm.Items.Item("59").Visible() = False
oForm.Items.Item("52").Visible() = False
oForm.Items.Item("53").Visible() = False
'Agent
oForm.Items.Item("226").Visible() = False
oForm.Items.Item("228").Visible() = False
oForm.Items.Item("227").Visible() = False
'BP Channel Code
oForm.Items.Item("333").Visible() = False
oForm.Items.Item("335").Visible() = False
oForm.Items.Item("334").Visible() = False
'Technician
oForm.Items.Item("336").Visible() = False
oForm.Items.Item("337").Visible() = False
oForm.Items.Item("338").Visible() = False
'Territory
oForm.Items.Item("343").Visible() = False
oForm.Items.Item("344").Visible() = False
oForm.Items.Item("345").Visible() = False
'Language
oForm.Items.Item("431").Visible() = False
oForm.Items.Item("430").Visible() = False
oForm.Items.Item("432").Visible() = False
'Deactivate UDF if BP cardcode <> ASSO...
oUDFForm = SBO_Application.Forms.GetForm("-134", 1)
oEdit = oForm.Items.Item("5").Specific
vVal = oEdit.Value
If Not vVal.StartsWith("ASSO") Then
oUDFForm.Visible = False
Else
oUDFForm.Visible = True
End If
End If
End If
End Sub
So, should I pack the instructions in a XML?
I'm also doing a comparison to hide the UDF, but if I move the form, the UDF comes back again!
How can I keep the UDF hidden?
Tkx,
Vítor.
User | Count |
---|---|
94 | |
11 | |
11 | |
6 | |
6 | |
4 | |
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.