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

createCommunity()

Creates a community definition.

See Also

rb.contact.individualInfo
rb.contact.modifyCommunity
rb.contact.link
rb.contact.remove

Syntax

number = rb.contact.createCommunity(values)

Parameters

The 'createCommunity' method takes 1 parameter:

Name Type/Value Range/Length Description
valuesstruct communityDatasee definition Required. community information for new community

Results

The 'createCommunity' method returns number:

Type/Value Range/Length Description
number -1, or positive integerCommunity ID of the created community, or -1 if the community 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 attempting to set a duplicate uName value already existing in another Individual, Community, or OU entry.

Example

The following creates a new community with uName "friends":

	  var friends = new Object;
	  friends.name = "Friends";
	  friends.uName = "friends";
	  friends.description = "Friends of the site";
	  var newID = rb.contact.createCommunity(friends);
	  if(newID < 0)
	  rb.page.write("Create community failed, friends already exists");

	
Whitebeam release 1.3.36
(loadtime : 197ms)