DTW Administration / Setup / Inventory / Cycle Count Determination
API Form Preferences 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.

Object Model


To use the service:

  1. Connect to a valid company.
  2. Call the CompanyService, which is the main DI service that you must call before using any other service.
  3. Call the method GetBusinessService for the required service.
  4. Create an empty data structure related to the required service.
    - or-
    You can create a data structure from an XML file or XML string.
  5. Set the required properties of the specified data structure.
  6. Call the required service method.

To display the form in the application:

  1. Select a form.
  2. From the main menu, select Tools --> Form Settings.

Mandatory properties:

  1. FormID and User (ColumnsPreferencesParams)
  2. Column, ItemNumber and Width (ColumnPreferences).


See Also

SAP® B1 DI-API C# definition

public class FormPreferencesServiceClass : IFormPreferencesService, FormPreferencesService { public extern FormPreferencesServiceClass(); public virtual extern ColumnsPreferences GetColumnsPreferences( ColumnsPreferencesParams pIColumnsPreferencesParams); public virtual extern object GetDataInterface( FormPreferencesServiceDataInterfaces enumMSDI); public virtual extern object GetDataInterfaceFromXMLFile( string bstrFileName); public virtual extern object GetDataInterfaceFromXMLString( string bstrXMLString); public virtual extern void UpdateColumnsPreferences( ColumnsPreferencesParams pIColumnsPreferencesParams, ColumnsPreferences pIColumnsPreferences); }

Related information

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

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

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