📚 SAP Business One SDK Help

AddFinancialYear Method
See Also  Example
pIFinancialYear
The data for the new financial year

Description

Adds a financial year.

Syntax

Visual Basic
Public Function AddFinancialYear( _
   ByVal pIFinancialYear As FinancialYear _
) As FinancialYearParams

Parameters

pIFinancialYear
The data for the new financial year

Return Type

Contains the key (AbsId) of the new financial year.

Example

Adding a financial year (C#)Copy Code
try 

    SAPbobsCOM.FinancialYear oFY; 
    oFY = (SAPbobsCOM.FinancialYear)oFYSrv.GetDataInterface(FinancialYearsServiceDataInterfaces.fysFinancialYear); 
    oFY.Code = "200703"; 
    oFY.Description = "FY 07-08"; 
    DateTime otime = DateTime.Parse("01/03/2007"); 
    oFY.StartDate = otime; 
    oFY.AssessYear = "200703"; 
    oFYSrv.AddFinancialYear(oFY); 

catch (Exception ex) 

    Interaction.MsgBox(ex.Message, (Microsoft.VisualBasic.MsgBoxStyle)(0), null); 
}

See Also