Adds an entry to a folder. (V1—V1.0.3)
public long addFolderEntry( long folderId, String definitionId, String inputDataAsXML, String attachedFileName | null );
The addFolderEntry operation adds an entry to a folder.
The binder identifier of the folder that is to contain the new entry.
The 32-character, hexadecimal identifier that maps to the type of entry to be created (for example, some default entry types are topic, file, blog, wiki, and calendar).
The easiest way to work with definition identifiers for entries is to specify null for this value. When you specify null, Teaming automatically applies the definition identifier for the default entry type of the folder in which you are creating a new entry. For example, by default, you want to create an entry in a blog folder. If you pass null as the definition identifier, Teaming automatically applies the definition identifier for a blog entry.
As another option, you can use the getDefinitionConfigAsXML operation to get information about all definitions. Then, you can parse the XML string for the definition identifier of the type of entry you want.
A string of XML containing the values needed to create an entry of your desired type.
Use the Teaming UI to create a complete entry of the type you want this Web services operation to create, note the entry identifier, and then use the getFolderEntryAsXML operation to return XML for the entry. Then, use the returned XML as a template for this parameter.
The name of the file you wish to attach to the new entry. This is an optional parameter. The file must be located in the directory in which the client code executes.
The entry identifier for the newly created entry.
This code creates a new entry in the folder whose binder identifier is 21; the specified entry-definition identifier maps to a discussion topic. The variable s contains XML elements needed by Teaming to create the entry. The new entry includes the attached file whose filename is specified by the value of the filename variable.
This code produces the same effect as the last example, except that it does not attach a file.