Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

RetrieveAttributeChangeHistoryRequest Does not Returns Incomplete Data

Posted on by Microsoft Employee

I have a task to track status changes on cases.  I turned on Auditing for the Case Entity.

I took a case and changed statuses like this:

New -> Save

Waiting on Customer -> Save

CS 1 -> Save

Waiting on Customer-> Save

CS 1 -> Save

Waiting on Customer -> Save

CS 2 -> Save

Then I resolved the case with "Issue Resolved" Status.

I would expect the RetrieveAttributeChangeHistoryRequest to return this:

Old Value New Value
In Progress New
New Waiting on Customer
Waiting on Customer CS 1
CS 1 Waiting on Customer
Waiting on Customer CS 1
CS 1 Waiting on Customer
Waiting on Customer CS 2
CS 2 Issue Resolved

But it does not - it only returns these records:

Old Value New Value
In Progress New
New Waiting on Customer
Waiting on Customer CS 1

That's it.  It is missing several changes I made to the status.   I also tried pulling the data with the RetrieveRecordChangeHistoryRequest, and it pulls the exact same results.

Furthermore, I looked at the Audit table and I can see my changes are in the Audit table, if you look at the change data from the bottom up, the correct statuscode id's are displayed in the order I changed them, Except the Issue Resolved Status is not there which is another problem.

changedata.PNG

Please tell me I am doing something wrong and that the C# methods for the Audit records aren't completely useless????

Thanks,

Coty

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: RetrieveAttributeChangeHistoryRequest Does not Returns Incomplete Data

    Sorry, I forgot to add, this is how I am pulling the attribute data:

    
    
    var myAattributeChangeHistoryRequest = new RetrieveAttributeChangeHistoryRequest
    {
    Target = new EntityReference(
    "incident", myCaseId),
    AttributeLogicalName = "statuscode"
    };
    multipleRequest.Requests.Add(myAattributeChangeHistoryRequest);

    Or the Record Data:

                    var myAattributeChangeHistoryRequest = new RetrieveRecordChangeHistoryRequest
                    {
                        Target = new EntityReference(
                        "incident", myCaseId)
                    };
                    multipleRequest.Requests.Add(myAattributeChangeHistoryRequest);




Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans