Sets a value for the key in the selected account data scope (either public or private).
If the key does not exist, it is created. If it exists, its value is overwritten.
Name | Description | Type | Use |
---|---|---|---|
scope | Specifies whether the data lays within the public or private scope of the account. |
string
|
required |
key | Identifies the exact data item that is created or updated by the setField
operation. |
string
|
required |
value | Represents the exact value that is set for the given key. |
string
|
required |
callback | Passed while sending a reply to the request referring to a field. | object |
required |
The Field
object's callback can be structured as follows:
{ onFailure: function(error) { ... }, onSuccess: function() { ... } }
Name | Description | Return type |
---|---|---|
onFailure |
Indicates that a request referring to a field was not processed. |
undefined |
onSuccess |
Indicates that a request referring to a field was successfully processed. |
undefined |