+ Start a Discussion
cldavecldave 

Custom Button help please !!!

Alright, after reading trough a lot of board message i fininally give up and ask 4 help

 

My reps do these actions a lot and i'm trying to combine them into 1 button to expedite things:

 

Steps:

 

1-change the Lead status to: Sent info and save

2-Send a specif email template (DONE)

3-add to Specif campaign called "info email"  and save

 

now i finally got step 2 done in a button already  (https://na2.salesforce.com/_ui/core/email/author/EmailAuthor?p2_lkid={!Lead.Id}&rtype=00Q&template_id=00X400000017659&save=X&retURL=%2F{!Lead.Id}&saveURL=%2F{!Lead.Id})    and it works properly now i'm tryng to add the other two steps into the same button and this is where i'm statrting to get lost

 

if somebody could help or at least let me know if even possible i would appreciate.

 

 

Lead Status Id: 00N40000001esp6

Campaign Id (info Email): 70140000000G6Ol

 

 

 

MayeUPAEPMayeUPAEP

Hi cldave,

You could solve The first Step making a workflow to change a field

About the 3rd step you need to create a campaign member. I made something similar I needed to add an Account to a campaign and I made this:

 

 

        public CampaignMember miembroCampana {get; set;}
        private String CAMPAIGN_ID;

... //Constructor
        CAMPAIGN_ID = '70140000000G6Ol';
        miembroCampana          = new CampaignMember();
... //In the Button class
        miembroCampana.CampaignId = CAMPAIGN_ID;
        Account cp = [select p.PersonContactId from Account p where p.Id = : cuenta.Id];
        miembroCampana.ContactId = cp.PersonContactId;
        insert miembroCampana;

 

 

Hope it could help you

 

 

 

cldavecldave

Thank you for your fast response , but i do not think this is what i need (or most probably it is and i did not do it properly) as this does not appear to be a formula that i input in the formula field of the custom button

 

Could you please clarify it 4 me, and tell me how i can combine this with the other formula i provided before (the one to send email with a specific template on a custom button. On my 1st post)

 

Thank you very much

MayeUPAEPMayeUPAEP

Do you have msn?? so we could talk widely about it??

cldavecldave

Yes you can reach me anytime (10 am - 6pm eastern time) on this msn address: kennyfromcs@hotmail.com

 

Thx a lot