biuan SAP® BUSINESS ONE SDK
DTW Administration / Setup / Inventory / Cycle Count Determination
API Form Preferences Service / Update Columns Preferences

Description

Updates the column preferences of a specified form for a specified user with the data specified in ColumnsPreferences data structure.

Syntax

Parameters

pIColumnsPreferencesParams
Returns the data structure that specifies the identification key combination (user and form) of the Form Preferences.
pIColumnsPreferences

Returns the data structure that specifies the data for update the Form Preferences.

Example

The following is a VB.NET sample that updates the width of all the visible items in the invoice form settings.
UpdateColumnPreferences (Visual Basic)
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)

See Also

Related information


Columns Preferences ColumnsPreferences Collection
ColumnsPreferences is a collection of ColumnPreferences data structures.
   Parent: Form Preferences Service FormPreferencesService Service

Columns Preferences Params ColumnsPreferencesParams Object· Table: CPRF
The ColumnsPreferencesParams  specifies the identification key combination (user and FormId) for which the FormPreferencesService is related. Source table: CPRF.
   Parent: Form Preferences Service FormPreferencesService Service

Form Preferences Service Data Interfaces FormPreferencesServiceDataInterfaces Enumeration
FormPreferencesService data interfaces.
   Parent: Form Preferences Service FormPreferencesService Service

Form Preferences Service FormPreferencesService Service
The FormPreferencesService manages the display preferences of a specified form for a specified user. Form preferences include settings such as, column width, visual order of columns, and more.



SAP® Business One is the trademark(s) or registered trademark(s) of SAP AG in Germany and in several other countries. Contact
This website is not affiliated with, maintained, authorized, endorsed or sponsored by SAP AG or any of its affiliates