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
MaumanMauman 

Cannot Create/Insert or Delete CampaignMember Entries

It appears that I am no longer able to insert into the CampaignMember entity.  I get the following error:

Error Code: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY
Error Message: entity type cannot be inserted

In December I tracked what I could and could not do via a script:

2003.12.29 16:15:08+0734: Metadata for CampaignMember object:

2003.12.29 16:15:08+0734: Object name                       = CampaignMember
2003.12.29 16:15:08+0734: Number of fields                  = 11
2003.12.29 16:15:08+0734: Object can be activated           = false
2003.12.29 16:15:08+0734: Can create rows of data           = true
2003.12.29 16:15:08+0734: Object is custom object           = false
2003.12.29 16:15:08+0734: Can delete rows of data           = true
2003.12.29 16:15:08+0734: Can query for rows of data        = true
2003.12.29 16:15:08+0734: Object can be used in replication = false
2003.12.29 16:15:08+0734: Can use retrieve method on object = true
2003.12.29 16:15:08+0734: Can use search method on object   = false
2003.12.29 16:15:08+0734: Can un-delete rows of data        = false
2003.12.29 16:15:08+0734: Can update rows of data           = false

When I just re-ran the script, it appears I cannot create or delete rows anymore:

2004.04.01 16:39:58+0359: Metadata for CampaignMember object:

2004.04.01 16:39:58+0359: Object name                       = CampaignMember
2004.04.01 16:39:58+0359: Number of fields                  = 11
2004.04.01 16:39:58+0359: Object can be activated           = false
2004.04.01 16:39:58+0359: Can create rows of data           = false
2004.04.01 16:39:58+0359: Object is custom object           = false
2004.04.01 16:39:58+0359: Can delete rows of data           = false
2004.04.01 16:39:58+0359: Can query for rows of data        = true
2004.04.01 16:39:58+0359: Object can be used in replication = false
2004.04.01 16:39:58+0375: Can use retrieve method on object = true
2004.04.01 16:39:58+0375: Can use search method on object   = false
2004.04.01 16:39:58+0375: Can un-delete rows of data        = false
2004.04.01 16:39:58+0375: Can update rows of data           = false

Any ideas what might have changed??? 

This is imperitive so I can associate leads I import to campaigns.

DevAngelDevAngel

Hi Mauman,

Did any of your permission settings change?  Are you logging as the same user as you did back in Dec?

MaumanMauman

The account I am using has not been modified as far as I can tell.  The account is a "System Administrator" account and should have full access.  Anyone have any other ideas on what might have changed?

DevAngelDevAngel

Hi Mauman,

Nothing has changed in regard to the default permissions on the CampaignMember (or any other object for that matter).  Try logging in to the app using the same credentials you are using for your describe call and try to create a campaign member.  I'm not sure how else to approach this short of examining the permissions in Setup on the app.

You should verify the user profile and role and make sure that access is explicitly giving (or at least not explicitly denied).  Try logging in as another use and see if the permissions look right.  Something had to change on your account, because I've not heard from any other customers.  I just can't pinpoint what it might have been.

DevAngelDevAngel

Hi Mauman,

On further review....  Actually, a thought struck me just after my last post.  To test my theory, I went to my DE account and for the System Administrator user I unchecked the Marketing User check box in that user's properties.  Lo and behold, the describe showed I could not create or update CampaignMembers.

Please check that setting for the user that you are using to login with.

Cheers

MaumanMauman

Marking the user account as a Marketing User has appeared to solve the problem.  I guess I shouldn't have assumed that the System Administor Profile can do everything!  Thanks!