Hi Friends,
I am trying to retrive the data of aduit history of opportunity but i am getting error that "Identity provider cannot be blanked"
Thanks
Below is the code--
private static void ExtractFromAudit(OrganizationServiceProxy XrmProxy)
{
// The GUID of the object you want to retirve in this case i am passing contactid
var entityId = new Guid("bb1ccfd1-f6d8-e411-80ed-c4346bac991c");
Console.WriteLine("Retrieving the change history.\n");
// Retrieve the audit history for the account and display it.
RetrieveRecordChangeHistoryRequest changeRequest = new RetrieveRecordChangeHistoryRequest();
changeRequest.Target = new EntityReference(Opportunity.EntityLogicalName, entityId);
RetrieveRecordChangeHistoryResponse changeResponse =
(RetrieveRecordChangeHistoryResponse)XrmProxy.Execute(changeRequest); //error coming in this line
AuditDetailCollection details = changeResponse.AuditDetailCollection;
foreach (AttributeAuditDetail detail in details.AuditDetails)
{
// Display some of the detail information in each audit record.
DisplayAuditDetails(detail);
}
}
*This post is locked for comments