AquaLogic Interaction Development Kit (IDK) 6.0.0 |

# IPortletManager.CreatePortletInstance Method

Returns an `IPortlet` object that represents a new Portlet instance in the portal.

IPortlet CreatePortletInstance(
int parentFolderID,
int templateID
);

#### Parameters

parentFolderID
  The folder in which to create the new Portlet instance.
templateID
  The template with which to create this Portlet instance.

#### Return Value

An object representing the new Portlet instance; the client must call `IPortlet.Save()` to save the Portlet instance in the portal.

#### Remarks

Note: This Portlet will not be created in the portal until the `IPortlet.Save()` method is called.

#### Exceptions

Exception Type | Condition
--- | ---
NoSuchObjectException | There is no object with the specified ID.
HttpException | The query interface URL is not valid.
PortalException | The operation resulted in an error in the portal.
SoapException | There was a communication problem during the execution of the remote method call.

#### See Also

IPortletManager Interface | Plumtree.Remote.PRC Namespace