InsertItem method: Favorite collection
Syntax
InsertItem(FavoriteLabel, FavoriteName)
Description
The InsertItem method inserts the Favorite object identified by FavoriteName into the Favorite Collection.
Note:
The portal registry classes execute some methods "interactively", that is, as they happen. The item won't be marked for insertion, then actually inserted later. The item is inserted to the database as soon as the method is executed.
Parameters
| Parameter | Description |
|---|---|
|
FavoriteLabel |
Specify a label for the new Favorite. This is the text by which the favorite is identified to the end-user. |
|
FavoriteName |
Specify the name of a new Favorite. This parameter takes a string value. If you specify a name that already exists in the collection, you get an error. |
Returns
A reference to the new Favorite object if the method executed successfully, NULL otherwise.