Sys.Services ProfileService save Method

Saves the specified profile properties.

Sys.Services.ProfileService.load(propertyNames, saveCompletedCallback, failedCallback, userContext);
Parameters

Parameter

Description

propertyNames

A string array that contains the profile properties to save.

saveCompletedCallback

The function that is called when the save method has finished. The default is null.

failedCallback

The function that is called if the save method has failed. The default is null.

userContext

User context information passed to the callback functions.

Remarks

If propertyNames is not supplied, all profile properties are sent to the server. The loaded profile can then be assigned directly from the properties field. This enables your application to access the profile properties by using simple field syntax, as shown in the following example:

Sys.Services.ProfileService.properties.FieldName = "value";

If the call to the profile service fails, the function that is specified in the error defaultFailedCallback property is called. If the call succeeds, the function that is specified in the defaultLoadCompletedCallback is called.

Example

The following example shows how to use the save method to load the currently authenticated user's profile. This code is part of a complete example found in the Sys.Services.ProfileService class overview.

ph
    Sys.Services.ProfileService.save(null, 
        SaveCompletedCallback, ProfileFailedCallback, null);
See Also

Concepts

Tags :


Community Content

Thomas Lee
Typos
1. The signature at the beginning uses the load method rather than the save method.

2. The example section has this text: "The following example shows how to use the save method to load the currently authenticated user's profile". Shouldn't it say it is SAVING the profile, not loading? If it is correct, perhaps a clarification could be provided.
Tags : contentbug

Page view tracker