Export (0) Print
Expand All
Expand Minimize

GetReportHistoryLimit Message (CrmService)

banner art

[Applies to: Microsoft Dynamics CRM 4.0]

Works for all deployment typesWorks online only

Gets the history limit for a report.

The relevant classes are specified in the following table.

TypeClass
RequestGetReportHistoryLimitRequest
ResponseGetReportHistoryLimitResponse
Entityreport

Remarks

To use this message, pass an instance of the GetReportHistoryLimitRequest class as the request parameter in the Execute method.

To perform this action, the caller must have Read access rights on the report entity instance. For a list of required privileges, see GetReportHistoryLimit Privileges.

Example

The following code example shows you how to use the GetReportHistory message.

[C#]
// Set up the CRM service.
CrmAuthenticationToken token = new CrmAuthenticationToken();
// You can use enums.cs from the SDK\Helpers folder to get the enumeration for Active Directory authentication.
token.AuthenticationType = 0; 
token.OrganizationName = "AdventureWorksCycle";
 
CrmService service = new CrmService();
service.Url = "http://<servername>:<port>/mscrmservices/2007/crmservice.asmx";
service.CrmAuthenticationTokenValue = token;
service.Credentials = System.Net.CredentialCache.DefaultCredentials;

// Create a request.
GetReportHistoryLimitRequest rhlRequest = new GetReportHistoryLimitRequest();
// This is the built-in report "Account Overview".
rhlRequest.ReportId = new Guid("A8228F55-A868-DC11-9F6D-0003FFA48E24");

// Execute the request.
GetReportHistoryLimitResponse rhlResponse = (GetReportHistoryLimitResponse)crmService.Execute(rhlRequest);

// Access the history limit data.
int historyLimit = rhlResponse.HistoryLimit;
[Visual Basic .NET]
' Set up the CRM service.
Dim token As New CrmAuthenticationToken()
' You can use enums.cs from the SDK\Helpers folder to get the enumeration for Active Directory authentication.
token.AuthenticationType = 0
token.OrganizationName = "AdventureWorksCycle";
 
Dim service As New CrmService()
service.Url = "http://<servername>:<port>/mscrmservices/2007/crmservice.asmx";
service.CrmAuthenticationTokenValue = token;
service.Credentials = System.Net.CredentialCache.DefaultCredentials

' Create a request.
Dim rhlRequest As New GetReportHistoryLimitRequest()
' This is the built-in report "Account Overview"
rhlRequest.ReportId = New Guid("A8228F55-A868-DC11-9F6D-0003FFA48E24")

' Execute the request.
Dim rhlResponse As GetReportHistoryLimitResponse = CType(crmService.Execute(rhlRequest), GetReportHistoryLimitResponse)

' Access the history limit data.
Dim historyLimit As Integer = rhlResponse.HistoryLimit

See Also

Reference


© 2010 Microsoft Corporation. All rights reserved.


Show:
© 2014 Microsoft