Skip to main content
8 votes
Accepted

DML operation INSERT not allowed on Campaign

You need to be a Marketing User in order to create campaigns. Go to profile and check Marketing User checkbox From the documentation: Marketing User When enabled, the user can create, edit, and ...
Samir's user avatar
  • 2,679
7 votes
Accepted

Integrate SFMC Campaigns with CRM

Totally different features with absolutely no relation to each other. Salesforce Campaigns are for actual event management, with direct relation to Campaign Members and Opportunities. Marketing Cloud ...
Rain's user avatar
  • 5,775
6 votes
Accepted

How to roll-up Custom Object field values onto Standard Campaign Object?

Declarative Lookup Rollup Summaries is your friend any time you're seeking to roll up information that's any of Not aggregated under a Master-Detail relationship Requires filtering more complex than ...
David Reed's user avatar
  • 93.2k
5 votes

Acces to campaigns in Standard Platform User Profile

Salesforce platform license does not allow to have access of Campaign object. Designed for users who need access to custom apps but not to standard CRM functionality. Users with this user license ...
Mr.Frodo's user avatar
  • 5,802
5 votes

Marketing Cloud Campaigns Vs Sales Cloud Campaigns?

They are entirely different features to start with. In Marketing Cloud the 'Campaign' is just a way to tag your content with a keyword to easily find related content and activities, and see it on ...
Rain's user avatar
  • 5,775
4 votes

linking accounts to campaigns

One possible solution is create a new object Account_Campaign_Members. Which is a join object between Account & Campaign (It has 2 Lookup references to both Objects) And then update the ...
Alexander Aeons Torn's user avatar
4 votes
Accepted

APEX Unit Test - test data with roll-up totals not as expected

Objects are normally related via Id values not references so one change to make is to replace this: opportunity.Campaign = campaign; with this: opportunity.CampaignId = campaign.Id; so the ...
Keith C's user avatar
  • 136k
4 votes
Accepted

Apex Class Object Constructor - Objects returns with null values

Because Apex is case insensitive this: public FundTotals(Integer numberOfOpportunities, ...) { NumberOfOpportunities = numberOfOpportunities; ... } is assigning the method parameter to ...
Keith C's user avatar
  • 136k
4 votes
Accepted

Apex Trigger for Adding Contacts to Campaigns as Campaign Members

The reason for the error has to do with context: CampaignMember cm = new CampaignMember(CampaignId = '7011a000000BBny', ContactId = opp.Primary_Contact__r.Id, Status = 'Sent'); ...
cropredy's user avatar
  • 71.9k
4 votes
Accepted

Configure "Total Value Opportunities" on the campaign object

Each Opportunity that you create, you can link to a Campaign (using the standard "Primary Campaign Source" lookup field on Opportunity). You can do this either manually, or automate this via Campaign ...
nicolas's user avatar
  • 234
4 votes
Accepted

How can I get the Campaign IDs of Leads through triggers?

[SELECT Id, CampaignId, LeadId FROM CampaignMember WHERE LeadId IN :leadsInTrigger ] Using this query you get all campaign member for the leads that are in your trigger scope. From that you should be ...
Nielsm's user avatar
  • 2,084
4 votes

Does Deleting a Campaign Cascade Delete Campaign Members?

Yes, Campaign Members cannot exist without either the Campaign and the Lead or Contact (this is a many-to-many master-detail relationship). They will be cascade deleted, meaning that they will not ...
sfdcfox's user avatar
  • 495k
4 votes
Accepted

Getting campaign code from Marketing Cloud

There's no data view or standard extract, but you can get the list of all Campaigns and their associated attributes - Code, Name, Colour etc from the REST API's /hub/v1/campaigns route. The response ...
Macca's user avatar
  • 8,256
4 votes
Accepted

Is it possible to combine rows within an SOQL query

I'm afraid that SOQL alone isn't capable of doing what you want (heck, I don't know if plain 'old SQL could do that)...at least not exactly in the way you describe. SOQL does give us the GROUP BY ...
Derek F's user avatar
  • 62.4k
4 votes
Accepted

Campaign - Opportunities in Campaign field

From the Doc: Calculated field for number of opportunities associated with the campaign. (Read only) Salesforce automatically calculates this amount using all associated records ...
Mr.Frodo's user avatar
  • 5,802
4 votes

Campaign - Opportunities in Campaign field

NumberOfOpportunities is a bit of a magic field, as are all of the other summary fields on Campaigns. It behaves like a rollup field, but the calculations are asynchronous, and delayed by up to 10 ...
sfdcfox's user avatar
  • 495k
4 votes
Accepted

Email Tracking Conversion in Salesforce Marketing Cloud Analytics builder

Please be aware, that Conversion Tracking and Web & Mobile Analytics Collect Code are two different applications with different use cases. The first one indeed solves your use case, since it ...
Lukas Lunow's user avatar
  • 21.7k
4 votes
Accepted

Problems with campaign member status field value

Campaign Member Status values are configured per campaign. They are not global. Note from the linked documentation: At this time, this cannot be done for all campaigns at once, but instead has to ...
David Reed's user avatar
  • 93.2k
4 votes
Accepted

Apex Error No such column 'ParentCampaign' on entity 'Campaign'

You can't query relationships. You can either query Id or fields from relationship. Try to use SELECT Campaign.ParentId FROM CampaignMember or SELECT Campaign.Parent.Id FROM CampaignMember or ...
Patlatus's user avatar
  • 17.2k
4 votes
Accepted

Campaign and Campaign member relationship

Some standard relationships support Rollup Summary Fields, despite being listed as a Lookup field. For custom relationships, Rollup Summary Fields are only supported on the Master-Detail relationship ...
sfdcfox's user avatar
  • 495k
4 votes
Accepted

Utilizing Date Time Lookup in AMPScript on Marketing Cloud

The quotes around NOW()-60 and NOW()-30 are causing that code to be read as a text string. The DateAdd() AMPscript function can be used to calculate your dates, by using negative numeric values to ...
jake314159's user avatar
4 votes
Accepted

How to determine when someone has been removed from a campaign (REST API)

This is a textbook use case for Change Data Capture, which supports CampaignMember. Your remote application would subscribe to Change Data Capture events for the CampaignMember object and could then ...
David Reed's user avatar
  • 93.2k
3 votes

How can I get the Campaign IDs of Leads through triggers?

As per the documentation, the Campaign field on the Lead object is not accessible via the API. So you will have to do this via the Campaign Member object, which associates leads and campaigns together....
Andy Hitchings's user avatar
3 votes
Accepted

Does Deleting a Campaign Cascade Delete Campaign Members?

If you ever want to know whether the child members are cascade deleted, a metadata browsing tool will tell (like Workbench). It is also queryable via the describe methods within Apex.
cropredy's user avatar
  • 71.9k
3 votes

Getting campaign code from Marketing Cloud

I wish it was. The only thing that I've found is the CampaignID in the Sent file in a Tracking Extract.
Adam Spriggs's user avatar
  • 30.8k
3 votes
Accepted

Mass delete all campaign members Salesforce

For less than 10,000 rows, the easiest way would be an execute anonymous script: delete [select Id from CampaignMember where Campaign.Name in ('Name 1','Name 2','Name 3'); To run this, click on Your ...
sfdcfox's user avatar
  • 495k
3 votes
Accepted

How to add a lead to a campaign in Apex code

Campaign is a magic field, whose purpose is to aid in attaching a lead to a campaign on creation, both through the UI and web-to-lead. It is not a "real" field, and so cannot be used in Apex Code or ...
sfdcfox's user avatar
  • 495k
3 votes
Accepted

Setting a Campaign Member RecordType automatically based on the Campaign RecordType

All the CampaignMember records associated to a Campaign record possess the same RecordTypeId. The field used to determine the RecordTypeId is CampaignMemberRecordTypeId and it is present on Campaign ...
the_phantom's user avatar
  • 2,015
3 votes
Accepted

MailChimp Campaign Hourly Stats taking up too much data in the Storage Usage

You can delete this data with the Apex Data Loader. Start with an Export, find the MailChimp Campaign Hourly Stats, export all the rows, and then run the export file through the Delete option. To ...
sfdcfox's user avatar
  • 495k
2 votes
Accepted

Missing Standard Report

I figured it out. I didn't remember that you can hide reports by checking the "Select Report Types to Hide" box at report creation.
Chance's user avatar
  • 1,070

Only top scored, non community-wiki answers of a minimum length are eligible