Skip to main content
Version: 2.2.3

editDepartment

This method allows deleting the data of a department or business unit (if FGDEPTTYPE = 2). To edit these data, it is necessary to follow the standard documented below.

Java class
Requestweb\wwwroot\ws\java\admin\EditDepartmentRequestType.java
Returnweb\wwwroot\ws\java\admin\EditDepartmentResponseType.java

Request:

IDRequiredDescription
IDXDepartment ID #
DESCXDepartment description
IDUPPERUpper level department ID #
IDCOMPANYID # of the company where the department is defined
FGDEPTTYPEDepartment type:
1 - Department;
2 - Business unit.
IDCURRENCYCurrency ID #

Request structure:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:admin">
<soapenv:Header/>
<soapenv:Body>
<urn:editDepartment>
<!--You may enter the following 5 items in any order-->
<urn:ID>?</urn:ID>
<urn:DESC>?</urn:DESC>
<urn:IDUPPER>?</urn:IDUPPER>
<urn:IDCOMPANY>?</urn:IDCOMPANY>
<urn:FGDEPTTYPE>?</urn:FGDEPTTYPE>
<urn:IDCURRENCY>?</urn:IDCURRENCY>
</urn:editDepartment>
</soapenv:Body>
</soapenv:Envelope>

Return:

IDDescription
ReturnSUCCESS:  Primary key of the department (CDDEPARTMENT)
FAILURE: -1
StatusSUCCESS: SUCCESS
FAILURE: FAILURE
DetailSUCCESS: Record(s) updated.
FAILURE: message regarding the error that occurred.
CodeSUCCESS: 1.
FAILURE: Code regarding the error that occurred:
▪ 15 - Inexistent department
▪ 43 - The ID # has no value.
▪ 52 - Inexistent organizational unit.
▪ 53 - Inexistent upper level organizational unit.
▪ 54 - The [%s1] unit is a sublevel of [%s2].
▪ 63 - The DESC field cannot be empty.
▪ 64 - Inexistent upper level department.
▪ 92 - Currency not found.