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
okaylah52okaylah52 

How to override the Delete link in a related list?

How can I override a delete link/command in a related list? Or is there a trigger related to CampaignMember table?

I am interested in particular overriding the delete link/command of the Campaign Member Extras related list in the Campaign detail page or of the Campaign History related list in the Contact detail page.

(I want to detect if a CampaignMember is created or deleted, then I update Account object accordingly)

Thanks.

(Crossed out incorrect info. Campaign Member Extras is my custom object in my attempt to have extra campaign fields since we can't have custom fields in CampaignMember)


Message Edited by okaylah52 on 01-08-2009 05:23 PM
werewolfwerewolf
I would suggest that, rather than trying to override the Delete link, you instead write an Apex trigger on after deleted.  That will be much more robust.
okaylah52okaylah52
How can I write an Apex trigger for CampaignMember objects? CampaignMember object is not exposed to public (selectable in Eclipse Apex trigger drop-down list nor available from any Salesforce.com Customize pages). Am I missing something?

I seached the Salesforce community and blogs and all mentioned CampaignMember is not available, e.g. Allow_APEX_triggers_on_junction_tables_like_CampaignMember

Thanks.
werewolfwerewolf
Wait a minute.  Campaign Member is not a related list.  What is Campaign Member Extras?  I see no such related list.
okaylah52okaylah52
Ahh, Campaign Member Extras is my custom object. When I mentioned "CampaignMember related list", I was referring to the Campaign History related list in a Contact detail page. I am sorry for the confusion.

What I really need is a way to detect when a CampaignMember is created or deleted so I can execute other codes, e.g. update an account.