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

unlink()

Disassociates an entity (OU or individual) from a parent OU or a community

Syntax

number = rb.contact.unlink(target, container)

Parameters

The 'unlink' method takes 2 parameters:

Name Type/Value Range/Length Description
targetnumberinteger, valid ID Required. The ID of the OU or individual to be removed
containernumber  Required. The ID of the community or OU to remove target from.

Results

The 'unlink' method returns number:

Type/Value Range/Length Description
number -1, positive integerID of unlink entity, or -1 on failure

Remarks

When unlink is used to remove an association to an OU, in doing so it will remove any community or OU memberships which have been inherited from that OU

For example take the individual "fred":

  • "fred" is linked to parent OU "engineering"
  • OU "engineering", is linked to parent OU "Mega Corp"
  • OU "Mega Corp" linked to community "customers"
  • "fred" is also linked directly to community "friends"

"fred" is therefore a member of "engineering", "Mega Corp", "customers", and "friends"

Fred leaves Mega Corp and unlink is used to remove fred engineering, this unlink removes his membership of "engineering", "Mega Corp", "customers", but his membership of "friends" is retained.

Example

The following unlinks the user "fred" from the OU "mega"

	  fred = rb.contact.individualInfo(-1, "fred");
	  mega = rb.contact.OUInfo(-1, "mega")
	  if(rb.contact.unlink(fred.ID, mega.ID) < 0))
	  rb.page.write("unlink returned error");
	
Whitebeam release 1.3.36
(loadtime : 110ms)