common-set-item-template-by-id
Change the template of a Sitecore content item by specifying its ID, enabling content restructuring while optionally mapping field values between templates.
Instructions
Sets the item template by the item's ID.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The ID of the item to set the template for. | |
| template | Yes | The path representing the template item. | |
| fieldsToCopy | No | The key-value pairs map the old template fields to the new template fields. The key represents the old template field, and the value represents the new template field. | |
| database | No | The database containing the item (defaults to the context database). |