📚 SAP Business One SDK Help

AccountCategoryService Object
See Also  Members  Example

Description

This service allows you to manage account categories (add, delete, get by key, get list, and update) for use with the Copy Express add-on.

Source table:  OACG.

Object Model




Remarks

Country-specific for US and Canada.

System categories cannot be deleted or updated.

Example

Account Category Service (Visual Basic)Copy Code
'Company Service
Dim oCompanyService As SAPbobsCOM.CompanyService

'Account Category Service
Dim AccCatService As SAPbobsCOM.AccountCategoryService

'Get Company Service
oCompanyService = oCompany.GetCompanyService

'Get Category Service
AccCatService = oCompanyService.GetBusinessService(SAPbobsCOM.ServiceTypes.AccountCategoryService)

'Account Category Objects
Dim AccCat, NewAcctCat As SAPbobsCOM.AccountCategory

'Account Category Parameters
Dim AccCatParams, NewAccCatParams As SAPbobsCOM.AccountCategoryParams

'Get Account Category
AccCatParams = AccCatService.GetDataInterface(SAPbobsCOM.AccountCategoryServiceDataInterfaces.acsAccountCategoryParams)
AccCat = AccCatService.GetDataInterface(SAPbobsCOM.AccountCategoryServiceDataInterfaces.acsAccountCategory)

AccCatParams.CategoryCode = 10
AccCat = AccCatService.GetCategory(AccCatParams)

'Get Account Category List
Dim CategoryList As SAPbobsCOM.AccountCategoriesParams
CategoryList = AccCatService.GetCategoryList

'Add New Account Category
NewAcctCat = AccCatService.GetDataInterface(SAPbobsCOM.AccountCategoryServiceDataInterfaces.acsAccountCategory)
NewAcctCat.CategoryName = "New Account Category"
NewAcctCat.CategorySource = SAPbobsCOM.AccountCategorySourceEnum.acsBalanceSheet
NewAccCatParams = AccCatService.AddCategory(NewAcctCat)



See Also