newDepartment
This method allows adding the data of a department or business unit (if FGDEPTTYPE = 2). For this addition, it is necessary to follow the standard documented below.
Java class | |
---|---|
Request | web\wwwroot\ws\java\admin\NewDepartmentRequestType.java |
Return | web\wwwroot\ws\java\admin\NewDepartmentResponseType.java |
Request:
ID | Required | Description |
---|---|---|
ID | X | Department ID # |
DESC | X | Department description |
IDPOS | ID # of the default position to be defined in the department | |
IDUPPER | Upper level department ID # | |
IDCOMPANY | ID # of the company where the department is defined | |
FGDEPTTYPE | Department type: 1 - Department; 2 - Business unit. | |
IDCURRENCY | Currency ID # |
Request structure:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:admin">
<soapenv:Header/>
<soapenv:Body>
<urn:newDepartment>
<!--You may enter the following 6 items in any order-->
<urn:ID>?</urn:ID>
<urn:DESC>?</urn:DESC>
<urn:IDPOS>?</urn:IDPOS>
<urn:IDUPPER>?</urn:IDUPPER>
<urn:IDCOMPANY>?</urn:IDCOMPANY>
<urn:FGDEPTTYPE>?</urn:FGDEPTTYPE>
<urn:IDCURRENCY>?</urn:IDCURRENCY>
</urn:newDepartment>
</soapenv:Body>
</soapenv:Envelope>
Return:
ID | Description |
---|---|
Return | SUCCESS: Primary key of the department (CDDEPARTMENT) FAILURE: -1 |
Status | SUCCESS: SUCCESS FAILURE: FAILURE |
Detail | SUCCESS: Record(s) added. FAILURE: message regarding the error that occurred. |
Code | SUCCESS: 1. FAILURE: Code regarding the error that occurred: ▪ 16 - Inexistent position. ▪ 43 - The ID # has no value. ▪ 45 - The record already exists. ▪ 53 - Inexistent upper level organizational unit. ▪ 63 - The DESC field cannot be empty. ▪ 64 - Inexistent upper level department. ▪ 92 - Currency not found. |