saveDataItem( )


開発者プレビュー

このAPIは変更される可能性があります。プレビュー期間中、開発者からのフィードバックに基づいてバグ修正や新機能がリリースされる予定です。

Inserts or updates an item in a collection.

について saveDataItem() function inserts or updates the specified item, depending on whether it already exists in the collection.

  • If you don't provide an ID, a new item is created.

  • If you provide an ID that does not exist in the collection, a new item is created with that ID.

  • If an item with the ID you provide already exists in the collection, that item is updated. When an item is updated, its data._updatedDate field is changed to the current date and time.

注: When you provide an item with an ID that already exists in the collection, the payload you provide in options.dataItem.data replaces the existing item with that ID. This means that the item's previous fields and values are lost.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Write Data Items
Learn more about app permissions.
メソッド宣言
コピー
メソッド・パラメータ
optionsSaveDataItemOptions

Options for saving an item in a collection.

リターン
Return Type:Promise<SaveDataItemResponse>
役に立ちましたか?
はい
いいえ