Search
setAttributes
Set the values of the fields of this CMS item. May return null if the item was deleted before this method was called.
const updatedItem = await collectionItem.setAttributes({ slug: "new-slug", fieldData: { [ageField.id]: { type: "number", value: 48 }, }, })
Parameters
update:EditableCollectionItemAttributes– The updated attributes for the collection item.
Returns
Promise<CollectionItem | null>– The updated CollectionItem, ornullif the item no longer exists.