biuan SAP® BUSINESS ONE SDK
API Branches Service / Delete Branch

Description

Deletes an existing branch.

The branch is specified by its key (Code), which is contained in the BranchParams object passed to the method.

Syntax

Visual Basic
Public Sub DeleteBranch( _
   ByVal pIBranchParams As BranchParams _
) 

Parameters

pIBranchParams
The key of the branch to be deleted.

Remarks

System branches cannot be updated.

Branches that have been assigned to a user or employee cannot be deleted.

Example

Deleting a branch (C#)
public void delete() { try { BranchParams delLine; delLine = (BranchParams)oBranchSrv.GetDataInterface(BranchesServiceDataInterfaces.bsBranchParams); //delete a record //please note that the code should be of an existing record. delLine.Code = 5; //delete oBranchSrv.DeleteBranch(delLine); } catch (Exception ex) { Interaction.MsgBox(ex.Message, (Microsoft.VisualBasic.MsgBoxStyle)(0), null); } }

See Also

Related information


Branch Branch Object· Table: OUBR
Represents a branch. Source table: OUBR Mandatory properties: Name
   Parent: Branches Service BranchesService Service· Table: OUBR

Branches Params BranchesParams Collection
A collection of BranchParams objects.
   Parent: Branches Service BranchesService Service· Table: OUBR

Branch Params BranchParams Object
Holds the key and name to an existing branch.  This object is used to pass keys to and retrieve keys from BranchesService methods.
   Parent: Branches Service BranchesService Service· Table: OUBR

Branches Service Data Interfaces BranchesServiceDataInterfaces Enumeration
BranchesService data interfaces.
   Parent: Branches Service BranchesService Service· Table: OUBR

Branches Service BranchesService Service· Table: OUBR
The BranchesService service enables you to add, look up and remove branches in the branches master data table. Branches can be assigned to users and employees. To see the list of branches and create a new one, select Administration -- Setup --...



SAP® Business One is the trademark(s) or registered trademark(s) of SAP AG in Germany and in several other countries. Contact
This website is not affiliated with, maintained, authorized, endorsed or sponsored by SAP AG or any of its affiliates