• Squire Kershner
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    Replies
I was asked to add a filtered related list to Contact, and accomplished this with visualforce.  I created a visualforce element that limits the campaign history, added it to the layout, and then removed the orignal Campaign History related list.  However, the request also asks that the new element now have the orignal "add to campaign" button on it.  However, I've tried multiple ways of getting the button transferred to the new element with poor results.

The best effort was using the following:
<apex:commandButton value="Campaign Member Assignment" action="{!URLFOR($Action.Contact.AddToCampaign,Contact.Id)}"/>

It opens the Campaign Member page inside the Visualforce element (bad) and doesn't actually save the member (also bad).
Help?

 
So, the requirement is to create a record on a custom object, from Opportunity.  However, we do not want it to be a related record/list.

1)  I assume, since the resulting record is not related to the Opportunity, I can't just use a hacked URL button to build the record?
2)  I believe I'll have to use JavaScript (unless there's another option) to build the record?  I thought about trying to fire a class from a button click to do this, but I'm just not sure how far to go.
3)  If I do need to use JavaScript, can I have the new record open in a not-saved status, and more importantly, return to the Opportunity after save, or have I just made the entire script overly complex?

Thank you.
I was asked to add a filtered related list to Contact, and accomplished this with visualforce.  I created a visualforce element that limits the campaign history, added it to the layout, and then removed the orignal Campaign History related list.  However, the request also asks that the new element now have the orignal "add to campaign" button on it.  However, I've tried multiple ways of getting the button transferred to the new element with poor results.

The best effort was using the following:
<apex:commandButton value="Campaign Member Assignment" action="{!URLFOR($Action.Contact.AddToCampaign,Contact.Id)}"/>

It opens the Campaign Member page inside the Visualforce element (bad) and doesn't actually save the member (also bad).
Help?

 
So, the requirement is to create a record on a custom object, from Opportunity.  However, we do not want it to be a related record/list.

1)  I assume, since the resulting record is not related to the Opportunity, I can't just use a hacked URL button to build the record?
2)  I believe I'll have to use JavaScript (unless there's another option) to build the record?  I thought about trying to fire a class from a button click to do this, but I'm just not sure how far to go.
3)  If I do need to use JavaScript, can I have the new record open in a not-saved status, and more importantly, return to the Opportunity after save, or have I just made the entire script overly complex?

Thank you.