function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Jay reddyJay reddy 

Need to access Campaign Influence related list records in Opportunity by SOQL

Hello,

I have a requirement where I need to access Campaign Influence records in the Opportunity related list by SOQL query. Basically, I need to access it because I have custom object looking up to CAMPAIGN. And I want to show all opportunities in that custom object related list "Opportunities" upon on adding the Campaign in the custom object.

Thanks,
GR
Ashish KeshariAshish Keshari
Hi Girish,
I have not worked on Campaign yet but I think this link might give some insight.
https://developer.salesforce.com/forums/?id=906F00000008oinIAA
Jay reddyJay reddy
@ashish,

I'm afraid It didn't help me much!! Thank you though.

GR
kirubakaran viswanathankirubakaran viswanathan
Hi,

Hope this forum helps you get the campaign records associated with Oppor
http://stackoverflow.com/questions/13605512/salesforce-soql-campaigns-with-influenced-opportunities

Also please make sure you enabled the Campaign Influence as mentioned in release notes
https://releasenotes.docs.salesforce.com/en-us/winter17/release-notes/rn_sales_features_core_campaign_influence2_setup.htm
 
bittu myanabittu myana
User-added image
configure the setting like above screen shot