Share via


About the Partner Profile Feature

The Partner Profile feature allows delegated administrators to edit the profile for their organization. When delegated administrators first enter the Partner Profile feature they are shown the profile data for their organization. The fields that are available to them are controlled through Commerce Server Business Desk. Each property in the profile has an attribute, sDelegatedAdminAccess. When the value of the sDelegatedAdminAccess attribute is zero (0), for a property it is not displayed. When the value is one (1), the property is displayed as read-only. When the value is two (2), the delegated administrator can change the property.

Some of the properties that the delegated administrator can change are simply edited in a text box on the page; however, properties that contain user names are changed with a picker mechanism. At the end of any field containing a user name is an ellipsis (...) button. When the administrator clicks that button, the administrator is redirected to the services\partner\users.asp page in "picker" mode. When the administrator selects a user from the list the admin is returned to the profile page and the field is filled in with the name of the user.

Initialization

Initialization for the Partner Profile feature occurs in the following files:

include\std_access_lib.asp

The EnsureAuthAccess and CheckPartnerServiceAccess functions verify that only authorized users with delegated administrator privileges are allowed access to this page. Unauthorized users are redirected to an error page.

services\include\initialize.asp

The InitializePartnerDesk subroutine sets the values of three variables; sAction, sSubAction, sProfileIDs, from the URL query string or form post variable.

services\include\lib.asp

The CheckIfProfilesExist subroutine verifies the globally unique identifier ProfileID(s).

Browse Time

The following file displays the Partner Profile feature:

services\partner\account.asp

This page ensures that users can only view the profile for their organization before rendering any content. Business logic and rendering are in separate routines to make the code easier to maintain and modify.

This page renders in one of four ways depending on the value of the sAction variable:

EDIT_ACTION

This is the first time the user views the page. This is also the default action. The PrepareEditAction subroutine handles the business logic and the htmEditAction function renders the page.

SAVE_ACTION

This action occurs when the user saves changes to the account profile.

The business logic is in the htmSaveActionHandler function rather than the PrepareSaveAction subroutine because the preparation varies by the value of the subAction variable. The PrepareSaveAction subroutine remains as a placeholder for any business logic that would apply to all values of the subAction variable. The htmSaveActionHandler function renders the page.

SELECT_ACTION

This action occurs when the delegated administrator selects a property containing a user profile for editing and there are multiple user profiles available. The PrepareSelectActionHandlerForEdit subroutine handles the business logic and the htmSelectActionHandlerForEdit function generates an HTML fragment, which redirects the user to the page services\partner\users.asp.

SELECTED_ACTION

This action occurs after a SELECT_ACTION, when the delegated administrator returns from selecting a user profile from the services\partner\users.asp page. The PrepareSelectedAction subroutine handles the business logic and the htmSelectedActionHandlerForEdit function renders the page.

See Also

About the Customer Profile Feature

About the Partner Users Feature

Using Profiles in Web Site Management

Copyright © 2005 Microsoft Corporation.
All rights reserved.