📚 SAP Business One SDK Help

DeleteSection Method
See Also  Example
pISectionParams
The key of the section to be deleted.

Description

Deletes an existing section.

The section is specified by its key (AbsId), which is contained in the SectionParams object passed to the method.

Syntax

Visual Basic
Public Sub DeleteSection( _
   ByVal pISectionParams As SectionParams _
) 

Parameters

pISectionParams
The key of the section to be deleted.

Remarks

You cannot delete a section that is associated with a withholding tax code (WithholdingTaxCodes) or certificate series (CertificateSeries).

Example

Deleting a section (C#)Copy Code
try 

     SAPbobsCOM.SectionParams oSecPara = (SAPbobsCOM.SectionParams)oSectionSrv.GetDataInterface(SectionsServiceDataInterfaces.ssSectionParams); 
     oSecPara.AbsEntry = 10; 
     oSectionSrv.DeleteSection(oSecPara);             

catch (Exception ex) 

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

See Also