Share via


GetProfile Method

Retrieves a specified profile from the server.

Namespace:  Microsoft.CommerceServer.Profiles
Assembly:  Microsoft.CommerceServer.Profiles.CrossTierTypes (in Microsoft.CommerceServer.Profiles.CrossTierTypes.dll)

Syntax

'Declaration
Public Function GetProfile ( _
    primaryKeyValue As String, _
    profileType As String _
) As XmlElement
'Usage
Dim instance As ProfileManagementContext
Dim primaryKeyValue As String
Dim profileType As String
Dim returnValue As XmlElement

returnValue = instance.GetProfile(primaryKeyValue, _
    profileType)
public XmlElement GetProfile(
    string primaryKeyValue,
    string profileType
)
public:
XmlElement^ GetProfile(
    String^ primaryKeyValue, 
    String^ profileType
)
public function GetProfile(
    primaryKeyValue : String, 
    profileType : String
) : XmlElement

Parameters

  • primaryKeyValue
    Type: System..::.String
    The value of the primary key property of the profile instance to retrieve.
  • profileType
    Type: System..::.String
    The type of profile to get (i.e. UserObject, Address).

Return Value

Type: System.Xml..::.XmlElement
XML representing the retrieved profile instance.

Exceptions

Exception Condition
ArgumentNullException

Any of the parameters provided is nullNothingnullptra null reference (Nothing in Visual Basic).

ArgumentException

The key value provided is not the correct type.

AuthenticationException

User has not been authenticated.

NotAuthorizedException

User is not authorized to perform this task.

DefinitionDoesNotExistException

The profile definition named in the profileTyped does not exist.

ProfileDoesNotExistException

No profile exists with the provided key value.

Remarks

Retrieves a specified profile from the server. Returns an XML representation of the retrieved profile instance.

Permissions

See Also

Reference

ProfileManagementContext Class

ProfileManagementContext Members

Microsoft.CommerceServer.Profiles Namespace