You need to sign in to do that
Don't have an account?
Akhil Katkam 5
How can i filter opportunity related recent ids from RecentlyViewed query
Hi Developer Community ,
i am working on a task (i have createda custom lookup field component )
in my apex class i have taken records based on recently viewed
actually i kept this component in opportunity record page , so i need to get particular opportunity related recoprds only
i tried keeping where opportunity__c:rec
but i am getting error , how to take particular opportunity related record ids
please help me with the ideas and solution
Thanks in Advacnce
i am working on a task (i have createda custom lookup field component )
in my apex class i have taken records based on recently viewed
for(RecentlyViewed recent : [SELECT Id,Name FROM RecentlyViewed WHERE Type =:ObjectName]) { recentIds.add(recent.Id); }this is the code i kept in apex class , but i need the records based on opportunity object
actually i kept this component in opportunity record page , so i need to get particular opportunity related recoprds only
i tried keeping where opportunity__c:rec
but i am getting error , how to take particular opportunity related record ids
please help me with the ideas and solution
Thanks in Advacnce
You can directly use the Opportunity object name in the type right or you are looking for something else.
Thanks,
Maharajan.C
i will show u an example: list<competition__c> comp= [select id,Name from competition__c where Opportunity__c =:rec];
here i am fetching competition records with respect to opportunity , in the same way i want to fetch for recently viewed records