|
Whitebeam Template Reference Documentation
|
Contact Template
createIndividual()
Creates and Individual contact entity.
See Also
rb.contact.individualInfo rb.contact.modifyIndividual rb.contact.link rb.contact.remove Syntax
number = rb.contact.createIndividual(values, initialParent, setPasswordType)
Parameters
The 'createIndividual' method takes 3 parameters:
Name | Type/Value | Range/Length | Description | values | struct individualData | see definition | Required. New individual info | initialParent | number | poitive integer | Optional, default = 0 The initial OU parent for this individual. The valid ID of the parent OU, or 0 (root) to indicate that the OU has no parent
| setPasswordType | number | | Optional. 0/null: Do not set password 1: Set password 2: Set password hashAvailable from version : 1.3.9 |
Results
The 'createIndividual' method returns number:
Type/Value | Range/Length | Description |
number |
-1, or positive integer | ID of the created record, or -1 if the record couldn't be created.
|
Remarks If no uName is supplied in the passed data structure then a long machine generated text string is inserted into this field to guarantee uniqueness A common reason for failure of the create operation is a duplicate uName value already existing in another Individual, Community, or OU entry. Example The following creates a new user "fred"
var fred = new Object;
fred.name = "Fred Foulkes";
fred.uName = "fred";
fred.description = "tall, dark hair";
fred.phone = "+1 666 440 1111"
var newID = rb.contact.createIndividual(fred);
if(newID == null)
rb.page.write("Couldnt create user fred, name already exists");
|
|
(loadtime : 98ms) |