In the history (in pic below) of my custom object which has a reference to another custom object how can i access old and new values for the field which references another object.

Event__c is a reference to another custom object(has a master detail relationship) , but there are no new/old values in the history table- the value in New Value is just a reference to the parent ID.(Category__c is a drop down - cant see the values for this too).

How do i retrieve the values of OldValue and NewValue for this?

enter image description here

  • I've tested this using a custom object in my org, and I cannot replicate the problem. When I change the value of a relationship field, the name of the new and old values are recorded correctly. What are you doing to the Events__c field?
    – fred
    Nov 11 '15 at 16:01
  • if this (Event__c) is a master-detail that doesn't allow reparenting, then there will never be an oldvalue for the relationship field as you can only create the relationship, never update it
    – cropredy
    Nov 11 '15 at 17:50
  • Based on the sceenshot looks like the old value for Category__c was empty (or null). But would you mind answering what is the field type and size of this field? Mar 7 at 20:30

You can fire a query on history object. If is test__c object then name will be testHistory.

  • this table is from the result of the query and that unfortunately is not my question
    – goSF
    Nov 11 '15 at 15:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.