Skip to main content
Version: 2.2.3

addUserDepartment

This method allows adding a relationship between user, department, and position. For this insertion, the standard documented below must be followed.

Java class
Requestweb\wwwroot\ws\java\admin\AddUserDepartmentRequestType.java
Returnweb\wwwroot\ws\java\admin\AddUserDepartmentResponseType.java

Request:

IDRequiredDescription
IDXUser ID.
IDAREAXDepartment ID #.
IDFUNCXPosition ID #.
FGDEFAULTUse as default: [1 - Yes, 2 - No].

Request structure:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:admin">
<soapenv:Header/>
<soapenv:Body>
<urn:addUserDepartment>
<!--You may enter the following 4 items in any order-->
<urn:ID>?</urn:ID>
<urn:IDAREA>?</urn:IDAREA>
<urn:IDFUNC>?</urn:IDFUNC>
<urn:FGDEFAULT>?</urn:FGDEFAULT>
</urn:addUserDepartment>
</soapenv:Body>
</soapenv:Envelope>

Return:

IDDescription
ReturnSUCCESS: User's primary key (CDUSER)
FAILURE: -1
StatusSUCCESS: SUCCESS
FAILURE: FAILURE
DetailSUCCESS: Record successfully associated.
FAILURE: Message regarding the error that occurred.
CodeSUCCESS: 1
FAILURE: Code regarding the error that occurred:
▪ 7 - Null user ID.
▪ 12 - Inexistent user.
▪ 13 - Null position ID #.
▪ 14 - Null department ID #.
▪ 15 - Inexistent department.
▪ 16 - Inexistent position.
▪ 19 - Inexistent relationship between department and position.
▪ 51 - The FGDEFAULT field only accepts the values (1, 2).