Bagikan melalui


RetrieveRecordWallRequest Class

 

Applies To: Dynamics CRM 2015

Contains the data that is needed to retrieve pages of posts, including comments for each post, for a specified record.

Namespace:   Microsoft.Crm.Sdk.Messages
Assembly:  Microsoft.Crm.Sdk.Proxy (in Microsoft.Crm.Sdk.Proxy.dll)

Inheritance Hierarchy

System.Object
  Microsoft.Xrm.Sdk.OrganizationRequest
    Microsoft.Crm.Sdk.Messages.RetrieveRecordWallRequest

Syntax

[DataContractAttribute(Namespace = "https://schemas.microsoft.com/crm/2011/Contracts")]
public sealed class RetrieveRecordWallRequest : OrganizationRequest
[DataContractAttribute(Namespace = "https://schemas.microsoft.com/crm/2011/Contracts")]
public ref class RetrieveRecordWallRequest sealed : OrganizationRequest
[<Sealed>]
[<DataContractAttribute(Namespace = "https://schemas.microsoft.com/crm/2011/Contracts")>]
type RetrieveRecordWallRequest = 
    class
        inherit OrganizationRequest
    end
<DataContractAttribute(Namespace := "https://schemas.microsoft.com/crm/2011/Contracts")>
Public NotInheritable Class RetrieveRecordWallRequest
    Inherits OrganizationRequest

Constructors

Name Description
System_CAPS_pubmethod RetrieveRecordWallRequest()

Initializes a new instance of the RetrieveRecordWallRequest class.

Properties

Name Description
System_CAPS_pubproperty CommentsPerPost

Gets or sets, for retrieval, the number of comments per post. Required.

System_CAPS_pubproperty EndDate

Gets or sets the end date and time of the posts that you want to retrieve. Optional.

System_CAPS_pubproperty Entity

Gets or sets the record for which to retrieve the wall. Required.

System_CAPS_pubproperty ExtensionData

Gets or sets the structure that contains extra data. Optional.(Inherited from OrganizationRequest.)

System_CAPS_pubproperty Item[String]

Gets or sets the indexer for the Parameters collection.(Inherited from OrganizationRequest.)

System_CAPS_pubproperty PageNumber

Gets or sets, for retrieval, a specific page of posts that is designated by its page number. Required.

System_CAPS_pubproperty PageSize

Gets or sets, for retrieval, the number of posts per page. Required.

System_CAPS_pubproperty Parameters

Gets or sets the collection of parameters for the request. Required, but is supplied by derived classes.(Inherited from OrganizationRequest.)

System_CAPS_pubproperty RequestId

Gets or sets the ID of an asynchronous operation (system job). Optional. (Inherited from OrganizationRequest.)

System_CAPS_pubproperty RequestName

Gets or sets the name of the request. Required, but is supplied by derived classes.(Inherited from OrganizationRequest.)

System_CAPS_pubproperty Source

Gets or sets a value that specifies the source of the post. Optional.

System_CAPS_pubproperty StartDate

Gets or sets the start date and time of the posts that you want to retrieve. Optional.

System_CAPS_pubproperty Type

Reserved for future use.

Methods

Name Description
System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_pubmethod ToString()

(Inherited from Object.)

Remarks

Message Availability

 For this message to work, the caller must be connected to the server.

Usage

Pass an instance of this class to the Execute method, which returns an instance of the RetrieveRecordWallResponse class.

Privileges and Access Rights

To perform this action, the caller must have the privileges on the specified entity in the Entity property and the access rights on the records that the returned posts regard or mention.

For a complete list of the required privileges, see RetrieveRecordWall message privileges.

Notes for Callers

The posts that are retrieved for a record wall include the posts that are regarding the record or that mention the record. For a system user (user) record wall, retrieved posts also include the posts that the user created. If a post is regarding a record, the Post.RegardingObjectId attribute contains the record ID. If a record is the system user (user) record, the Post.RegardingObjectId attribute contains the current user ID. If a post mentions a record, the record ID is specified within the Post.Text attribute.

Examples

The following example shows how to use this message. For this sample to work correctly, you must be connected to the server to get an IOrganizationService interface. For the complete sample, see the link later in this topic.


private void DisplayRecordWall(Lead lead)
{
    // Display the first page of the record wall.
    var retrieveRecordWallReq = new RetrieveRecordWallRequest
    {
        Entity = lead.ToEntityReference(),
        CommentsPerPost = 2,
        PageSize = 10,
        PageNumber = 1
    };

    var retrieveRecordWallRes =
        (RetrieveRecordWallResponse)_serviceProxy.Execute(retrieveRecordWallReq);

    Console.WriteLine("\r\n  Posts for lead {0}:", lead.FullName);
    foreach (Post post in retrieveRecordWallRes.EntityCollection.Entities)
    {
        DisplayPost(post);
    }
}

Private Sub DisplayRecordWall(ByVal lead As Lead)
    ' Display the first page of the record wall.
    Dim retrieveRecordWallReq = New RetrieveRecordWallRequest With
                                {
                                    .Entity = lead.ToEntityReference(),
                                    .CommentsPerPost = 2,
                                    .PageSize = 10,
                                    .PageNumber = 1
                                }

    Dim retrieveRecordWallRes = CType(_serviceProxy.Execute(retrieveRecordWallReq), 
        RetrieveRecordWallResponse)

    Console.WriteLine(vbCrLf &amp; "  Posts for lead {0}:", lead.FullName)
    For Each post As Post In retrieveRecordWallRes.EntityCollection.Entities
        DisplayPost(post)
    Next post
End Sub

Thread Safety

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

RetrieveRecordWallResponse
Microsoft.Crm.Sdk.Messages Namespace
RetrieveRecordWall message privileges
Activity feeds entities
Introduction to activity feeds
Sample: Collaborate with activity feeds
How role-based security can be used to control access to entities in Microsoft Dynamics CRM
How record-based security can be used to control access to records in Microsoft Dynamics CRM

Return to top

© 2016 Microsoft. All rights reserved. Copyright