Whitebeam Template Reference Documentation

Site Map
 
Home
 
Application Guide
Reference
  Installation
  Configuration
  XML Markup
  JavaScript Classes
  ROM
  Templates
  Environment
  Dev Process
  Tools
  External Links
  Example libraries
Community
Contact Whitebeam
To-Do
Download
Credits
Licence
Whitebeam Users
 
 
 

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
valuesstruct individualDatasee definition Required. New individual info
initialParentnumberpoitive 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
setPasswordTypenumber  Optional. 0/null: Do not set password
1: Set password
2: Set password hash

Available 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");
	
Whitebeam release 1.3.36
(loadtime : 66ms)