Condividi tramite


Sys.Services ProfileService defaultSaveCompletedCallback Property

Gets or sets the name of the default save-completed callback function.

Note

To get or set property values for client API properties, you must call property accessor methods that are named with the get_ and set_ prefixes. For example, to get or set a value for a property such as cancel, you call the get_cancel or set_cancel methods.

Sys.Services.ProfileService.set_defaultSaveCompletedCallback(value); 
var defaultSaveCompletedCallback =
    Sys.Services.ProfileService.get_defaultSaveCompletedCallback();

Parameters

Parameter

Description

value

A string that contains the name of the default save-completed callback function.

Remarks

The function specified in this property is used as the default callback function when the profile has been saved successfully. You can override this default callback function by passing the name of a different function to the save method.

When implementing this callback function, you must use the following signature:

function SaveComplete(numPropertiesSaved, userContext, methodName)

The parameters passed to the callback function have the following meaning:

  • numPropertiesSaved. Indicates the number of properties saved by the profile service.

  • userContext. User context information that you pass to the save method.

  • methodName. The name of the calling method.

The callback function is called asynchronously if the profile service finishes successfully.

Example

The following example shows how to use the defaultSaveCompletedCallback property. This code is part of a complete example found in the Sys.Services.ProfileService class overview.

// Set default load completed callback function.
Sys.Services.ProfileService.set_defaultSaveCompletedCallback(SaveCompletedCallback);

 // Get default save completed callback function.
var defaultSaveCompletedCallback =
    Sys.Services.ProfileService.get_defaultSaveCompletedCallback();

See Also

Concepts

Sys.Services.AuthenticationService Class

Sys.Net.WebServiceProxy Class