Skip to main content
Version: 2.2.1

newUser

This method allows adding/editing:

  • User data;
  • Relationship between User, Department, and Position;
  • Relationship between User and Access group.

If the user already exists and the department being entered is different from the one the user is already associated with, the new department will be associated and considered as the default.

If the user already exists and a field is changed with the same existing department and position, the system will return an error informing that the user is already being used by this department and position. To perform an audition, the IDAREA and IDFUNC identifiers should be informed in white. If the objective is to change the department and position, these functions can be informed so that the system can make this change.

To insert each of these items, it is necessary to follow the standard documented below.

Java class
Requestweb\wwwroot\ws\java\admin\NewUserRequestType.java
Returnweb\wwwroot\ws\java\admin\NewUserResponseType.java

Request:

ID #RequiredDescription
IDUSERXUser ID (ID #).
NAMEXUser name.
LOGINXName used by the user to log into the system.
PASSXUser password.
EMAILXUser e-mail address.
IDAREAX¹Department ID # to associated with the user.
IDFUNCX²Position ID # to be associated with the user.
IDACCGROUPAccess group ID # to be associated with the user.
CDLEADERLeader ID # to be associated with the user.
LANGUAGEEnter the user language code, in accordance with the "Database Encoding" column of the Localization section, in the System Requirements document
info
  • X¹ - Required only when IDFUNC is completed.
  • X² - Required only when IDAREA is completed.

Request structure:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:admin">
<soapenv:Header/>
<soapenv:Body>
<urn:newUser>
<!--You may enter the following 10 items in any order-->
<urn:IDUSER>?</urn:IDUSER>
<urn:NAME>?</urn:NAME>
<urn:LOGIN>?</urn:LOGIN>
<urn:PASS>?</urn:PASS>
<urn:EMAIL>?</urn:EMAIL>
<!--Optional:-->
<urn:LANGUAGE>?</urn:LANGUAGE>
<urn:IDAREA>?</urn:IDAREA>
<urn:IDFUNC>?</urn:IDFUNC>
<urn:IDACCGROUP>?</urn:IDACCGROUP>
<!--Optional:-->
<urn:CDLEADER>?</urn:CDLEADER>
</urn:newUser>
</soapenv:Body>
</soapenv:Envelope>

Return:

ID #Description
returnSUCCESS: Created user primary key.
FAILURE: -1
StatusSUCCESS: SUCCESS
FAILURE: FAILURE
CodeSUCCESS: 1.
FAILURE: Code regarding the error that occurred.
RecordIdSUCESS: User ID (ID #).
FAILURE: N/A
RecordKeySUCCESS: Created user primary key.
FAILURE: N/A
CodeDescription
-1Unexpected error.
2Inexistent access group.
3field¹: The maximum size for this field is size.
4Error identifying the user. There is more than one record with the same login.
5It is not allowed to use quotation marks in the login field.
6Null user login.
7Null user ID.
8Null user name.
9Null password.
10Null or inexistent language.
11The entered leader does not exist.
12Inexistent user.
13Null position ID #.
14Null department ID #.
15Inexistent department.
16Inexistent position.
17Inexistent relationship between department and position.
18The user ID cannot be equal to the leader ID #.
59Language not supported by the database.
60Inexistent language.
89Null user e-mail.