Show TOC

set( onsuccess, onerror, key, value ) methodLocate this document in the navigation structure

Set an (JSON serializable) object in the DataVault.

Syntax

<static> set( onsuccess, onerror, key, value )

Parameters
Name Type Description
<onsuccess> sap.Logon~successCallbackNoParameters The function to invoke upon success.onsuccess will be called without parameters for this method.
<onerror> sap.Logon~errorCallback The function to invoke in case of error.
<key> string The key to store the provided object on.
<value> object The object to be set on the given key.Must be JSON serializable (ie: cannot contain circular references).
Example
var errorCallback = function(errorInfo){
    alert("Error: " + JSON.stringify(errorInfo));
}
var getSuccess = function(value){
    alert("value retrieved from the store: " + JSON.stringify(value));
}
var setSuccess = function(){
    sap.Logon.get(getSuccess,errorCallback,'someKey');
}
sap.Logon.set(setSuccess,errorCallback,'someKey', 'some string (could also be an object).');