on 07-13-2006 5:23 AM
Is there a way to update form settings of system form (e.g. PO) using SDK? I am using SAP 2004B.
Thanks in advance
Hi Clarence,
Lookup "FormPreferencesService" in the SDK Help Center, serach for it and you will see that it is for...
"This service enables to get and update the display preferences of a specified form for a specified user."
I hope this is what you looking for.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi... I can see you using SBO2004B... FormPreferencesService is only avaiable for SBO2005A at the moment...
Example for the SDK help
Dim oCmpSrv As SAPbobsCOM.CompanyService
Dim oFormPreferencesService As FormPreferencesService
Dim oColsPreferences As ColumnsPreferences
Dim oColPreferencesParams As ColumnsPreferencesParams
Dim i As Integer
'get company service
oCmpSrv = oCompany.GetCompanyService
'get Form Preferences Service
oFormPreferencesService = oCmpSrv.GetBusinessService(ServiceTypes.FormPreferencesService)
'get Columns Preferences Params
oColPreferencesParams = oFormPreferencesService.GetDataInterface(FormPreferencesServiceDataInterfaces.fpsdiColumnsPreferencesParams)
'set the form id (e.g. A/R invoice=133)
oColPreferencesParams.FormID = "133"
'set the user id (e.g manager= 1)
oColPreferencesParams.User = 1
'get the Columns Preferences according to the formId & user id
oColsPreferences = oFormPreferencesService.GetColumnsPreferences(oColPreferencesParams)
'change the width of all the visible items
For i = 0 To oColsPreferences.Count - 1
'check if the item is visible
If oColsPreferences.Item(i).VisibleInForm = BoYesNoEnum.tYES Then
'set the width of the item
oColsPreferences.Item(i).Width = 100
End If
Next
'update all changes
oFormPreferencesService.UpdateColumnsPreferences(oColPreferencesParams, oColsPreferences)
User | Count |
---|---|
98 | |
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.