• bristolbluebear
  • NEWBIE
  • 10 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 5
    Replies
Hello

Can someone help with a custom add to campaign button. I have created the button on the campaign object so it appears on leads and contacts screens. Its pointing at a specific campaign so it does away with the find campaign feature.  

This is what I have:

/00v/e?c_id=701D0000000hrS6
&RecordType=012D0000000BeKT
&parent_id={!Contact.Id}
&{!CampaignMember.Status}="Invited"

Works fine adding a contact to the campaign, but I'd also like the same button to add a lead from that object.

Can you add parent id to look at contact.id or lead.id or do I have to have java script instead? I'd also like for it to save and return to the parent.id if possible. 

Thanks in advance. 

Marc 
Hello

I was wondering if someone would be kind enough to help me. 

I am looking for a trigger to pull into a custom object the amount for a closed won opportunity based on a user lookup field filled with their name. 

So if User Joe Bloggs has closed won £ this month, list the opportunities in the custom object called targets, so I can roll up the total amount of opportunities and compare it to a field that has a sales target. 

I dont write code unfortunatley but willing to learn. 

Your help or advice is very much appreciated in advance. 

Marc 
Hello

I created the following trigger to count how many specific tasks are closed. The only problem is that it doesnt count the tasks that were closed by inactive users, only counts active users. Can anyone help or advise? Appreciation in advance  

trigger CalculateClosedTasks on Task (after delete, after insert, after undelete,
after update) {

// Declare the variables

public set<Id> LeadIDs = new Set<Id>();
public list<Lead> LeadsToUpdate = new List<Lead>();
public set<Id> ContactIDs = new Set<Id>();
public list<Contact> ContactsToUpdate = new List<Contact>();

// Build the list of Leads and Contacts to update
if(Trigger.isInsert || Trigger.isUnDelete || Trigger.isUpdate){
    for(Task t: Trigger.new){
        if(t.WhoId<>null){
            if(string.valueOf(t.WhoId).startsWith('00Q')&&t.Contact_Call_Outcome__c==True)
            LeadIDs.add(t.WhoId);
            if(string.valueOf(t.WhoId).startsWith('003')&&t.Contact_Call_Outcome__c==True)
            ContactIDs.add(t.WhoId);
        }
    }
}

if(Trigger.isDelete || Trigger.isUpdate){
    for(Task t: Trigger.old){
        if(t.WhoId<>null){
            if(string.valueOf(t.WhoId).startsWith('00Q')&&t.Contact_Call_Outcome__c==True)
            LeadIDs.add(t.WhoId);
            if(string.valueOf(t.WhoId).startsWith('003')&&t.Contact_Call_Outcome__c==True)
            ContactIDs.add(t.WhoId);
        }
    }
}

// Update the Leads

if(LeadIDs.size()>0){
for(Lead l: [Select l.Id, l.Closed_Tasks__c,
(Select Id From Tasks where Contact_Call_Outcome__c = True)
From Lead l where Id in :LeadIDs])
LeadsToUpdate.add(new Lead(Id=l.Id, Closed_Tasks__c = l.Tasks.size()));
update LeadsToUpdate;
}

// Update the Contacts

if(ContactIDs.size()>0){
for(Contact c: [Select c.Id, c.Closed_Tasks__c ,
(Select Id From Tasks where Contact_Call_Outcome__c = True)
From Contact c where Id in :ContactIDs])
ContactsToUpdate.add(new Contact(Id=c.Id, Closed_Tasks__c = c.Tasks.size()));
update ContactsToUpdate;
}

}
 
Hello

I have been directed here for some help from Answers 

I am looking for help creating a button that sits in the list view of both Accounts and Contacts that allows me to change owner on both objects simultaneously regardless of the object list view I in. 

I have been advised I need to write a VF page but I'm afraid I am not a developer. 

Can anyone help or who use such a function? Appreciate in advance. 

Marc 

 
Hello

I'm not a developer by a long shot but was hoping someone could answer this for me so I dont spend my whole afternoon looking fir an answer. 

I'm looking to create an event booking through Opportunity but realise that Contact Name is required to be manually selected. 

Can I create a flow that picks up the Opportunity ID, matches the Contact Primary Role of the Opportunity and populates the Event Contact field through a Process? 

Your responses are most appreciated :) 

Marc 
Hello

I posted this question in Salesforce help and was pointed in this direction for help. 
--------------------------------------------------------------------------------------------------------------------------
"Lead Lifetime Report

Bit of an issue with the report. If one of my guys creates an additional opportunity after conversion and closes that opportunity, there is a break in the lifetime report and the lead will remain neglected although there has been a closed won. How do I?:

1 - Update the 2nd opp to be included in the report. 
2 - Stop my guys creating another opportunity until the original is closed. 
--------------------------------------------------------------------------------------------------------------------------

I'm looking for a trigger that stops an additional opportunity being created if another is owned by the user and is still open. 

Any help or advice will be appreciated. 

Marc 



 
Hello

My hidden fields are not populating when creating the lead 

Here is my code:

<input type="hidden"<select  id="lead_source" name="lead_source">
<value="Exhibition: Build It South East 2015"/>
<input type="hidden"<select  id="recordType" name="recordType">
<input type="hidden"<value="012200000000vEt"/>
<br>
Expo Salesperson: <select  id="00N200000027Cgs" name="00N200000027Cgs" title="Expo Salesperson"><option value="">--None--</option>
<option value="Adrian Wild">Adrian Wild</option>
<option value="Marc Brady">Marc Brady</option>
<option value="Thomas Brooks">Thomas Brooks</option>
</select><br>
<input type="hidden"Build IT SE 2015:<input  id="00ND0000006535W" name="00ND0000006535W" type="checkbox" checked />
<br>
<input type="hidden"<select  id="Campaign_ID" name="Campaign_ID"><value="701D0000000wI6Z"/>
<br>
<input type="hidden" name="member_status" value="Enquiry created on stand " />
<br>
<input type="submit" name="submit">
</form>

Have I missed something ot have  it written wrong?

Hello

 

Not sure if this is the right place to post this but:

 

How do you edit the reminder field to delete the times not required and change the time values to every 15 minutes rather than 30?

 

Cheers in advance

 

Marc

Hi

 

Can I create a button that will activate a workflow to set a new call/task for my advisors. I already have a workflow when a box is ticked it sets a call back from workflow but really need a button on the lead/enquiry page and the contact page.


Can anyone help?

Hello

I have been directed here for some help from Answers 

I am looking for help creating a button that sits in the list view of both Accounts and Contacts that allows me to change owner on both objects simultaneously regardless of the object list view I in. 

I have been advised I need to write a VF page but I'm afraid I am not a developer. 

Can anyone help or who use such a function? Appreciate in advance. 

Marc 

 
Hello

I was wondering if someone would be kind enough to help me. 

I am looking for a trigger to pull into a custom object the amount for a closed won opportunity based on a user lookup field filled with their name. 

So if User Joe Bloggs has closed won £ this month, list the opportunities in the custom object called targets, so I can roll up the total amount of opportunities and compare it to a field that has a sales target. 

I dont write code unfortunatley but willing to learn. 

Your help or advice is very much appreciated in advance. 

Marc 
Hello

I created the following trigger to count how many specific tasks are closed. The only problem is that it doesnt count the tasks that were closed by inactive users, only counts active users. Can anyone help or advise? Appreciation in advance  

trigger CalculateClosedTasks on Task (after delete, after insert, after undelete,
after update) {

// Declare the variables

public set<Id> LeadIDs = new Set<Id>();
public list<Lead> LeadsToUpdate = new List<Lead>();
public set<Id> ContactIDs = new Set<Id>();
public list<Contact> ContactsToUpdate = new List<Contact>();

// Build the list of Leads and Contacts to update
if(Trigger.isInsert || Trigger.isUnDelete || Trigger.isUpdate){
    for(Task t: Trigger.new){
        if(t.WhoId<>null){
            if(string.valueOf(t.WhoId).startsWith('00Q')&&t.Contact_Call_Outcome__c==True)
            LeadIDs.add(t.WhoId);
            if(string.valueOf(t.WhoId).startsWith('003')&&t.Contact_Call_Outcome__c==True)
            ContactIDs.add(t.WhoId);
        }
    }
}

if(Trigger.isDelete || Trigger.isUpdate){
    for(Task t: Trigger.old){
        if(t.WhoId<>null){
            if(string.valueOf(t.WhoId).startsWith('00Q')&&t.Contact_Call_Outcome__c==True)
            LeadIDs.add(t.WhoId);
            if(string.valueOf(t.WhoId).startsWith('003')&&t.Contact_Call_Outcome__c==True)
            ContactIDs.add(t.WhoId);
        }
    }
}

// Update the Leads

if(LeadIDs.size()>0){
for(Lead l: [Select l.Id, l.Closed_Tasks__c,
(Select Id From Tasks where Contact_Call_Outcome__c = True)
From Lead l where Id in :LeadIDs])
LeadsToUpdate.add(new Lead(Id=l.Id, Closed_Tasks__c = l.Tasks.size()));
update LeadsToUpdate;
}

// Update the Contacts

if(ContactIDs.size()>0){
for(Contact c: [Select c.Id, c.Closed_Tasks__c ,
(Select Id From Tasks where Contact_Call_Outcome__c = True)
From Contact c where Id in :ContactIDs])
ContactsToUpdate.add(new Contact(Id=c.Id, Closed_Tasks__c = c.Tasks.size()));
update ContactsToUpdate;
}

}
 
Hello

I have been directed here for some help from Answers 

I am looking for help creating a button that sits in the list view of both Accounts and Contacts that allows me to change owner on both objects simultaneously regardless of the object list view I in. 

I have been advised I need to write a VF page but I'm afraid I am not a developer. 

Can anyone help or who use such a function? Appreciate in advance. 

Marc 

 
Hello

I posted this question in Salesforce help and was pointed in this direction for help. 
--------------------------------------------------------------------------------------------------------------------------
"Lead Lifetime Report

Bit of an issue with the report. If one of my guys creates an additional opportunity after conversion and closes that opportunity, there is a break in the lifetime report and the lead will remain neglected although there has been a closed won. How do I?:

1 - Update the 2nd opp to be included in the report. 
2 - Stop my guys creating another opportunity until the original is closed. 
--------------------------------------------------------------------------------------------------------------------------

I'm looking for a trigger that stops an additional opportunity being created if another is owned by the user and is still open. 

Any help or advice will be appreciated. 

Marc