Share via


RetrieveAllChildUsersSystemUser Message

banner art

Retrieves the collection of users that report to the specified system user (user).

The relevant classes are specified in the following table.

Type Class
Request RetrieveAllChildUsersSystemUserRequest
Response RetrieveAllChildUsersSystemUserResponse
Entity systemuser

Remarks

To perform this action, the caller must have access rights on the system user (user) entity instance. For a list of required privileges, see RetrieveAllChildUsersSystemUser Privileges.

Example

The following code example shows how to use the RetrieveAllChildUsersSystemUser message.

[C#]
// Set up the CRM Service.
CrmService service = new CrmService();
service.Credentials = System.Net.CredentialCache.DefaultCredentials;

// Create the request object.
RetrieveAllChildUsersSystemUserRequest retrieve = new RetrieveAllChildUsersSystemUserRequest();

// Create the column set object that indicates the fields to be retrieved.
ColumnSet cols = new ColumnSet();

// Set the column set properties.
cols.Attributes = new string [] {"fullname", "systemuserid", "domainname"};

// Set the column set.
retrieve.ColumnSet = cols;

// Set the ID of the parent user.
retrieve.EntityId = new Guid("18ECA720-493E-4800-BBFD-638BD54EB325");

// Execute the request.
RetrieveAllChildUsersSystemUserResponse retrieved = (RetrieveAllChildUsersSystemUserResponse) service.Execute(retrieve);

[Visual Basic .NET]
Dim retrieve As RetrieveAllChildUsersSystemUserRequest()

' Create the column set.
Dim cols As New ColumnSet()
cols.Attributes = New String() {"fullname", "systemuserid", "domainname"}
retrieve.ColumnSet = cols

' Set the ID of the parent user.
retrieve.EntityId = New Guid("18ECA720-493E-4800-BBFD-638BD54EB325")

' Execute the request.
Dim retrieved As RetrieveAllChildUsersSystemUserResponse = CType(service.Execute(retrieve), RetrieveAllChildUsersSystemUserResponse)

Related Topics

CrmService Messages

© 2007 Microsoft Corporation. All rights reserved.