Create and update customers

Void setValue(String column, String Value)

Sets a named field to the given value. Look up names in the reference section down below, or check out the class reference.

🛈 Note
Both parameters are strings! Remember to use quotes even for IDs.
User u;
u.load(9);
u.setValue("email", "bob@example.com");
u.save();

Integer save()

Saves a new or updated user and returns its ID.

  • If the ID is set before calling save(), it’s an update.
  • If the ID is empty, it’s a create.
User u;
u.setValue("firstname", "Sam");
printLine(u.save().toString());

Reference

Frequently used values

ParameterDb fieldDescription
ididID (primary key)
usernameusernameUnique username or uid
profileIdprofile_idThe user’s profile (profile.id)
firstnamefirstnameThe first name of the person
lastnamelastnameThe last name of the person
emailEmail1 or more
ownerCompanyThe ID of the company linked to user’s person entity
groupusergroupThe primary group for the user
statusstatusStatus
active (1), not present(2), deleted (3)
languagelanguageThe user’s language, see list below for values

Language values

ValueDescription
0Norwegian
1English
2German
3Swedish
4Danish
5Dutch
6French
7Spanish
8Italian
9Czech
10Finnish
11Polish
12Russian
13Ukrainian

Sign-in info

ParameterDb fieldDescription
loginAttemptslogin_attemptsHow many times the user has tried to sign in with an incorrect password
lastLoginAttemptlast_login_attemptThe last time the user tried to sign in but failed
idleTimeidle_timeDuration in seconds the user has been idle

User flags and access flags

User flags represent preferences. For example, Use24HrsClock = 10.

Access flags represent what a user may do. For example, AccessDocuments = 8.

Ticket notifications

Notifications (pop-up warnings) to the user are controlled by a bit mask.

ValueDescription
1NewTicket
2NewTicketMessage
3TicketEscalated
4TicketActivated
5ActiveTickets (filter)
6TicketTakeOver
9Hotlist (filter)
10Custom

Learn more about tickets.