The create Command

Introduction

Using the create Command with a Facility as Target

Using the create Command with a Community as Target

Using the create Command with an Item as Target

Using the create Command with a Database as Target

Using the create Command with a Calendar as Target

Using the create Command with a Room as Target

Using the create Command with a ProjectSchedule as Target

Using the create Command with a ProjectTask as Target

Using the create Command with a DBProcess as Target

 

Introduction

For the create command, the XML query contains the object being created, using the same XML schema as the data returned by the getproperties command. The target of the command is the parent or container in which the object will be created. For instance, the Facility would be the target for creating an eRoom. The following is an example that creates a note page in the item box of the home page:


<er:command er:select="Rooms/Room[URLName=' NewProductLaunch']/HomePage">

<er:create>

<er:Item xsi:type="erItemTypeNotePage">

<er:Name>New Note</er:Name>

<er:ShowAttachments>true</er:ShowAttachments>

<er:ShowTopic>true</er:ShowTopic>

<er:Description xsi:type="erTextTypePlain">A simple plain text note</er:Description>

</er:Item>

</er:create>

</er:command>


In the above example, the Name and Description are required properties. The create command will fail if they are not present. ShowTopic and ShowAttachments are optional.

The response from the above command contains a status element, and if the command succeeded, it also contains the ID of the object that was created:


<er:response>

<er:status>

<er:code>0000000000</er:code>

<er:description>Success</er:description>

</er:status>

<er:ID>0_396</er:ID>

</er:response>


 

Go to top

Using the create Command with a Facility as Target

When the facility is the target of the create command, you can create eRooms, members, and licenses.

Creating a Room

To create an eRoom, you must supply the URLName and DisplayName as required parameters. If you supply an optional TemplateRoom parameter, you can specify an existing room in the same facility for use as a template in creating the new eRoom. The following sample shows all three parameters in use:
 

<er:command>

<er:create>

<er:Room>

<er:URLName>newroom</er:URLName>

<er:DisplayName>Created from a template</er:DisplayName>

<er:TemplateRoom>projectplans</er:TemplateRoom>

</er:Room>

</er:create>

</er:command>

 

This command creates a room named "newroom", with the display name "Created from a template" using the existing room named "projectplans" as a template.

Creating a License Key

Creating a license key amounts to adding a license string to the facility. To create a license, the required and only parameter is the LicenseKey.

Go to top

Using the create Command with a Community as Target

With a Community as the target of the create command, you can create a Member (user or group), or a Facility (SiteFacility).

Creating a Member

A member can be either a user or a group. The only required parameter to create a user is the LoginName. For a group, the required parameter is name. Which one is being created is determined by the xsi:type attribute on the member element. For example, to create a user:


<er:command>

<er:create>

<er:Member xsi:type="erMemTypeUser">

<er:LoginName>hford</er:LoginName>

<er:Email>hank@ford.com</er:Email>

<er:FirstName>Henry</er:FirstName>

<er:LastName>Ford</er:LastName>

<er:TimeZone>erTimeZoneCentralStandardTime</er:TimeZone>

</er:Member>

</er:create>

</er:command>


Go to top

 

Using the create Command with an Item as Target

Using an Item as the target, you can create the following objects as children of the target Item:

  • FolderPage

  • DiscussionPage

  • PollPage

  • PollEntry

  • NotePage

  • TopicPage

  • File

  • Link

  • InboxPage

  • CalendarPage

  • DBPage

  • Comment

  • Vote

Go to top

Using the create Command with a Database as Target

With a database as target, you can create DBColumns and DBRows.

Go to top

Using the create Command with a Calendar as Target

With a Calendar as the target of the create command, you can create CalendarEventPages.

Go to top

Using the create Command with a Room as Target

With a Room as the target of the create command, you can create a Member, but only if it is of type erMemTypeCustomRole.

Go to top

Using the create Command with a ProjectSchedule as Target

With a ProjectSchedule as the target of the create command, you can create a ProjectTask.

Go to top

Using the create Command with a ProjectTask as Target

With a ProjectTask as the target of the create command, you can create a ProgressReport.

Go to top

Using the create Command with a DBProcess as Target

With a DBProcess as the target of the create command, you can create a ProcessStep.

Go to top