RetrieveAttributeChangeHistoryRequest Class

Definition

Contains the data that is needed to retrieve all metadata changes to a specific attribute.

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

Examples

// Update the Telephone1 attribute in the Account entity record.

            var accountToUpdate = new Account();
              accountToUpdate.AccountId = _newAccountId;
              accountToUpdate.Telephone1 = "123-555-5555";
             svc.Update(accountToUpdate);
Console.WriteLine("Updated the Telephone1 field in the Account entity.");

// Retrieve the attribute change history.
Console.WriteLine("Retrieving the attribute change history for Telephone1.");

     var attributeChangeHistoryRequest = new RetrieveAttributeChangeHistoryRequest
       {
             Target = new EntityReference(
             Account.EntityLogicalName, _newAccountId),
             AttributeLogicalName = "telephone1"
};

var attributeChangeHistoryResponse =(RetrieveAttributeChangeHistoryResponse)svc.Execute(attributeChangeHistoryRequest);

// Display the attribute change history.
details = attributeChangeHistoryResponse.AuditDetailCollection;

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.

AuditingVB#Auditing7

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 RetrieveAttributeChangeHistoryResponse.

Privileges and Access Rights

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

Constructors

RetrieveAttributeChangeHistoryRequest()

Initializes a new instance of the RetrieveAttributeChangeHistoryRequest class.

Properties

AttributeLogicalName

Gets or sets the attribute’s logical (schema) name. Required.

ExtensionData

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

(Inherited from OrganizationRequest)
Item[String]

Gets or sets the indexer for the Parameters collection.

(Inherited from OrganizationRequest)
PagingInfo

Gets or sets the paging information. Optional.

Parameters

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

(Inherited from OrganizationRequest)
RequestId

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

(Inherited from OrganizationRequest)
RequestName

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

(Inherited from OrganizationRequest)
Target

Gets or sets the target audit record for which to retrieve attribute change history. Required.

Applies to