1 respuesta
You cannot able to use OldValue and NewValue in where clause OpportunityFieldHistory object. Please refer this link https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_opportunityfieldhistory.htmUse below Query to get the data and Filter it by using Apex code Select Id, CreatedById, CreatedDate, Field, NewValue, OldValue from OpportunityFieldHistory Where Field = 'StageName' AND CreatedDate = Last_Month