GetReportHistoryLimit Message (CrmService)
![]() |
[Applies to: Microsoft Dynamics CRM 4.0]
Find the latest SDK documentation: CRM 2015 SDK
| Works for all deployment types | Works online only |
Gets the history limit for a report.
The relevant classes are specified in the following table.
| Type | Class |
| Request | GetReportHistoryLimitRequest |
| Response | GetReportHistoryLimitResponse |
| Entity | report |
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
.gif)