📚 SAP Business One SDK Help

UpdatePeriod Method
See Also  Example
pIPeriodCategory
PeriodCategory data input.

Description

Updates the PeriodCategory data.

Syntax

Visual Basic
Public Sub UpdatePeriod( _
   ByVal pIPeriodCategory As PeriodCategory _
) 

Parameters

pIPeriodCategory
PeriodCategory data input.

Example

shows how to update a Period Category
UpdatePeriod (Visual Basic)Copy Code
      Dim oCompanyService As SAPbobsCOM.CompanyService
        Dim oPeriodCategoryColl As PeriodCategoryParamsCollection
        Dim oPerCategory As PeriodCategory

        'get company service
        oCompanyService = oCompany.GetCompanyService

        'get period category Collection
        oPeriodCategoryColl = oCompanyService.GetPeriods

        'get period category
        oPerCategory = oCompanyService.GetPeriod(oPeriodCategoryColl.Item(0))

        'set the Default Customer For A/R Invoice And Payment
        oPerCategory.InvoicePaymentBP = "C20000"

        'update period category
        oCompanyService.UpdatePeriod(oPerCategory)

See Also