Partager via


OrganizationProfile Property

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

Gets the Profile object containing the organization profile for the current user.

Namespace:  Microsoft.CommerceServer.Runtime
Assembly:  Microsoft.CommerceServer.Runtime (in Microsoft.CommerceServer.Runtime.dll)

Syntax

'Declaration
Public Property OrganizationProfile As Profile
'Usage
Dim instance As CommerceContext
Dim value As Profile

value = instance.OrganizationProfile

instance.OrganizationProfile = value
public Profile OrganizationProfile { get; set; }
public:
property Profile^ OrganizationProfile {
    Profile^ get ();
    void set (Profile^ value);
}
public function get OrganizationProfile () : Profile
public function set OrganizationProfile (value : Profile)

Property Value

Type: Microsoft.CommerceServer.Runtime.Profiles..::.Profile
The Profile object containing the organization profile for the current user.

Exceptions

Exception Condition
CommerceException

The OrganizationProfile property has not been previously set and either the UserProfile or ProfileSystem property is nullNothingnullptra null reference (Nothing in Visual Basic).

Remarks

The OrganizationProfile property is dependent on being set by the UserProfile property or set explicitly. The UserProfile property is dependent on being set by UserID property or set explicitly, and the UserID property is dependent upon being set explicitly or obtaining the Id from the AuthTicket object, if it exists. If this property is accessed before it has been explicitly set, the profile will be automatically retrieved from the Profiling System using the UserProfile property and the settings in the profiles section in the web.config file. This property will return nullNothingnullptra null reference (Nothing in Visual Basic) if the organization profile does not exist.

This property throws a CommerceException if the OrganizationProfile property has not been previously set and either the UserProfile or ProfileSystem property is nullNothingnullptra null reference (Nothing in Visual Basic).

Permissions

See Also

Reference

CommerceContext Class

CommerceContext Members

Microsoft.CommerceServer.Runtime Namespace