GetReportHistoryLimitRequest GetReportHistoryLimitRequest GetReportHistoryLimitRequest GetReportHistoryLimitRequest Class

Definition

Contains the data that is needed to retrieve the history limit for a report.

For the Web API use the GetReportHistoryLimit Function.

public ref class GetReportHistoryLimitRequest sealed : Microsoft::Xrm::Sdk::OrganizationRequest
[System.Runtime.Serialization.DataContract(Namespace="http://schemas.microsoft.com/crm/2011/Contracts")]
public sealed class GetReportHistoryLimitRequest : Microsoft.Xrm.Sdk.OrganizationRequest
type GetReportHistoryLimitRequest = class
    inherit OrganizationRequest
Public NotInheritable Class GetReportHistoryLimitRequest
Inherits OrganizationRequest
Inheritance
GetReportHistoryLimitRequestGetReportHistoryLimitRequestGetReportHistoryLimitRequestGetReportHistoryLimitRequest
Attributes

Examples


// Query for an an existing report: Account Overview. This is a default report in Microsoft Dynamics CRM.                   

var reportQuery = new QueryByAttribute(Report.EntityLogicalName);
reportQuery.AddAttributeValue("name", "Account Overview");
reportQuery.ColumnSet = new ColumnSet("reportid");

// Get the report.
            EntityCollection retrieveReports = svc.RetrieveMultiple(reportQuery);

// Convert retrieved Entity to a report
            var retrievedReport = (Report)retrieveReports.Entities[0];
            Console.WriteLine("Retrieved the 'Account Overview' report.");

// Use the Download Report Definition message.
var reportHistoryRequest = new GetReportHistoryLimitRequest
{
    ReportId = retrievedReport.ReportId.Value
};
    var reportHistoryResponse = (GetReportHistoryLimitResponse)svc.Execute(reportHistoryRequest);

// Access the history limit data
int historyLimit = reportHistoryResponse.HistoryLimit;
Console.WriteLine("The report history limit is {0}.", historyLimit);

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.

Reporting#GetReportHistoryLimit1 ReportingVB#GetReportHistoryLimit1

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(OrganizationRequest) method, which returns an instance of GetReportHistoryLimitResponse.

Privileges and Access Rights

To perform this action, the caller must have privileges on the Report entity and access rights on the record specified in the ReportIdproperty. For a complete list of the privileges required, see GetReportHistoryLimit message privileges.

Constructors

GetReportHistoryLimitRequest() GetReportHistoryLimitRequest() GetReportHistoryLimitRequest() GetReportHistoryLimitRequest()

Initializes a new instance of theGetReportHistoryLimitRequest class.

Properties

ExtensionData ExtensionData ExtensionData ExtensionData

Gets or sets the structure that contains extra data. Optional.

(Inherited from OrganizationRequest)
Item[String] Item[String] Item[String] Item[String]

Gets or sets the indexer for the Parameters collection.

(Inherited from OrganizationRequest)
Parameters Parameters Parameters Parameters

Gets or sets the collection of parameters for the request. Required, but is supplied by derived classes.

(Inherited from OrganizationRequest)
ReportId ReportId ReportId ReportId

Gets or sets the ID of the report. Required.

RequestId RequestId RequestId RequestId

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

(Inherited from OrganizationRequest)
RequestName RequestName RequestName RequestName

Gets or sets the name of the request. Required, but is supplied by derived classes.

(Inherited from OrganizationRequest)

Applies to

See also