📚 SAP Business One SDK Help

UpdateFinancialYear Method
See Also  Example
pIFinancialYear
The data for the financial year to be updated. The FinancialYear object must contain the key of the object to be updated.

Description

Updates an existing financial year.

The data for the financial year, including the key of the financial year to be updated, is contained in the FinancialYear passed to the method. To update a financial year, you must first retrieve it using the GetFinancialYear method.

Syntax

Visual Basic
Public Sub UpdateFinancialYear( _
   ByVal pIFinancialYear As FinancialYear _
) 

Parameters

pIFinancialYear
The data for the financial year to be updated. The FinancialYear object must contain the key of the object to be updated.

Example

Updating a financial year (C#)Copy Code
try 

    SAPbobsCOM.FinancialYear oUpdateLine; 
    SAPbobsCOM.FinancialYearParams oGetLine; 
 
    oGetLine = (SAPbobsCOM.FinancialYearParams)oFYSrv.GetDataInterface(FinancialYearsServiceDataInterfaces.fysFinancialYearParams); 
    oGetLine.AbsEntry = 4; 
    oUpdateLine = oFYSrv.GetFinancialYear(oGetLine); 
     DateTime otime = DateTime.Parse("01/05/2008"); 
     oUpdateLine.StartDate = otime; 
    oUpdateLine.Description = "updated"; 
    oFYSrv.UpdateFinancialYear(oUpdateLine); 
 

catch (Exception ex) 

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

See Also