You need to sign in to do that
Don't have an account?
lalitha_sfdc
How do I query New Value field on custom object history in SOQL?
I'm trying to query the date from the history object where the last status (field) is 'Request Approved' I tried the following query but unable to query on NewValue field on the history object.
error: NewValue' can not be filtered in query call".
Can Someone Help Me on this? Any other WorkAround?
error: NewValue' can not be filtered in query call".
SELECT CreatedById,CreatedDate,Field,Id,IsDeleted, NewValue,OldValue,ParentId FROM custobj__History WHERE ParentId = 'a1228000000fagQ' AND Field = 'Status__c' AND NewValue='Request Approved'
Can Someone Help Me on this? Any other WorkAround?
Here's the workaround , please try this code:
Please mark this question as solved if this helps you.
Thanks,
Apoorv
All Answers
Here's the workaround , please try this code:
Please mark this question as solved if this helps you.
Thanks,
Apoorv
This worked well.
For the new value field vote for the below idea
https://success.salesforce.com/ideaView?id=08730000000l6PSAAY
SELECT CreatedById,CreatedDate,Field,Id,IsDeleted, NewValue,OldValue,ParentId FROM custobj__History WHERE ParentId =: 'a1228000000fagQ'
you just need to add colun(:) after equals operator