-
ChatterFeed
-
2Best Answers
-
0Likes Received
-
0Likes Given
-
13Questions
-
8Replies
Trigger on Mass Emails
I have the following trigger on a Task... it works fine when entering one task at a time.
However, when I send out mass emails, the activity is logged, but the trigger doesn't fire?
I read an older post that stated mass emails will not fire the triggers...
Is there a way to get the trigger to fire when a mass email is sent...
Below is the trigger...
trigger updatelastemail on Task (after insert) {
Task t = Trigger.new[0];
if(t.WhoId != null) {
Lead l = [select Id, LastEmail__c from Lead where Id=:t.WhoId];
if(l != null) {
l.LastEmail__c = t.Email_Number__c;
update l;
}
}
}
Any suggestions will be greatly appreciated.
Thanks
-
- TheMaryC
- December 07, 2009
- Like
- 0
- Continue reading or reply
MAss Email Triggers
I have the following trigger on a Task... it works fine when entering one task at a time.
However, when I send out mass emails, the activity is logged, but the trigger doesn't fire?
I read an older post that stated mass emails will not fire the triggers...
Is there a way to get the trigger to fire when a mass email is sent...
Below is the trigger...
trigger updatelastemail on Task (after insert) {
Task t = Trigger.new[0];
if(t.WhoId != null) {
Lead l = [select Id, LastEmail__c from Lead where Id=:t.WhoId];
if(l != null) {
l.LastEmail__c = t.Email_Number__c;
update l;
}
}
}
Any suggestions will be greatly appreciated.
Thanks
-
- TheMaryC
- December 07, 2009
- Like
- 0
- Continue reading or reply
Update lead field based on activity field
-
- TheMaryC
- November 06, 2009
- Like
- 0
- Continue reading or reply
Update custom lead field based on a custom activity field
I have a custom field (EmailCount) on the Activity tab that gives me a count of certain types of activities. What I would like is for this field to be populated onto the Lead tab into another custom field (EmailCountLead).
I would have liked have done this through work rules, but I don't see the needed fields.
Thanks
-
- TheMaryC
- November 06, 2009
- Like
- 0
- Continue reading or reply
Count on Opportunities
I'm trying to display a count on the total # of opportunites for a contact and would like it displayed on the conntact the tab?
-
- TheMaryC
- May 22, 2009
- Like
- 0
- Continue reading or reply
Clone Opportunity
Below is some Apex code I found to copy an opportunity. However, I have a custom field "Membership_Expires" on the opportunity tab. I would like the new opportunity to add 365
try{
{!REQUIRESCRIPT("/soap/ajax/14.0/connection.js")}
// ** EDIT THIS QUERY TO LIST THE FIELDS YOU WANT TO COPY **
var result = sforce.connection.query("Select o.Type, o.StageName, o.Membership_Expires__C, o.CampaignId, o.Amount, o.AccountId From Opportunity o WHERE o.Id = '{!Opportunity.Id}'");
var newOpp = result.getArray("records");
// Reset the Opp Id and reset fields to default values
newOpp[0].Id = '';
newOpp[0].Name = " {!Opportunity.Name}";
// ** EDIT THESE FIELDS TO SET DEFAULT ANY VALUES **
newOpp[0].StageName = "Pledge";
newOpp[0].CloseDate = new Date(2099, 0, 1);
newOpp[0].Membership_Expires__c = {!Opportunity.Membership_Expires__c}
//This was my attempt to get the field to copy but that failed... once I got it to copy I was going to fiquer out how to add 365 days to the filed//
var saveResult = sforce.connection.create(newOpp);
if (saveResult[0].getBoolean("success")) {
newOpp[0].id = saveResult[0].id;
alert("Opportunity cloned without line items");
}
else {
alert("Failed to create clone: " + saveResult[0]);
}
// Refresh the page to display the new oppportunity
window.location = newOpp[0].id;
}
catch (err) {
alert (err.description );
} days to this custom field.
-
- TheMaryC
- May 21, 2009
- Like
- 0
- Continue reading or reply
Opportunity doesn't appear on the Contact tab?
If I'm on the Contact page and slect the "New Contact Donation", the donation shows up on the contact page......just like it's suppose to do.
However, if clone that donation, it does not appear on the Contact tab? Also, If i creat a donation from the donation tab, it doesn't appear on th Contact tab?
Any suggestions as to why?
I'm using Non Profit version...
-
- TheMaryC
- May 10, 2009
- Like
- 0
- Continue reading or reply
Copy field from Opportunity to Contact
Ok, I'm trying to write my first Apex Tricker and am not doing it very wel.. When ever a new opportunity is created, I want to copy a date custom field "Membership_Expires" to another date custom filed with the same name on the contact tab. Sounds like it should be straight forward, but I keep getting errors.... any help would be greatly appreciated.
Thanks
-
- TheMaryC
- May 07, 2009
- Like
- 0
- Continue reading or reply
Pledges-copy
First off, I'm usning the Nonprofit CRM. On the Donation/Opportunity tab, when ever the "stage" is changed from Pledge, to "Posted", I would like a new donation created with the same amount? I am trying to get memberships to automactially create a new pledge each time this years membership is paid. Any suggestions?
-
- TheMaryC
- May 03, 2009
- Like
- 0
- Continue reading or reply
Households
I'm using the NPO CRM. There is a custome filed on the Household applicaton labled "addressee". When a new contact is created it also populates certain Household accounts. However, I would also like it to populated the addresse field within the Household with the name from contacts tab.
Thanks
-
- TheMaryC
- May 03, 2009
- Like
- 0
- Continue reading or reply
lead conversio
-
- TheMaryC
- May 01, 2009
- Like
- 0
- Continue reading or reply
Lead Conversion
-
- TheMaryC
- May 01, 2009
- Like
- 0
- Continue reading or reply
Duplicate Contact Blocker
-
- TheMaryC
- May 01, 2009
- Like
- 0
- Continue reading or reply
Opportunity doesn't appear on the Contact tab?
If I'm on the Contact page and slect the "New Contact Donation", the donation shows up on the contact page......just like it's suppose to do.
However, if clone that donation, it does not appear on the Contact tab? Also, If i creat a donation from the donation tab, it doesn't appear on th Contact tab?
Any suggestions as to why?
I'm using Non Profit version...
- TheMaryC
- May 10, 2009
- Like
- 0
- Continue reading or reply
Copy field from Opportunity to Contact
Ok, I'm trying to write my first Apex Tricker and am not doing it very wel.. When ever a new opportunity is created, I want to copy a date custom field "Membership_Expires" to another date custom filed with the same name on the contact tab. Sounds like it should be straight forward, but I keep getting errors.... any help would be greatly appreciated.
Thanks
- TheMaryC
- May 07, 2009
- Like
- 0
- Continue reading or reply
lead conversio
- TheMaryC
- May 01, 2009
- Like
- 0
- Continue reading or reply
Lead Conversion
- TheMaryC
- May 01, 2009
- Like
- 0
- Continue reading or reply
Clone Opportunity w/wo related objects
The clone works fine (at least I think this is the best way to do it )
Opportunity opp=[Select o.qtyProductGroups__c, o.Won_Lost_Comment__c, o.State__c, o.StageName, o.Selected_Contact_Id__c, o.Remarks__c, o.RecordTypeId, o.Reason_Won__c, o.Reason_Lost__c, o.Probability, o.Primary_Opportunity__c, o.Pricebook2Id, o.Personal_Chance_of_Success__c, o.OwnerId, o.Opportunity_Type__c, o.Opportunity_Description__c, o.One_Shot_Order__c, o.IsWon, o.IsDeleted, o.IsClosed,
o.I_Internal_Status__c, o.I_Account_manager__c, o.HasOpportunityLineItem, o.ForecastCategoryName, o.ForecastCategory, o.FiscalYear,
o.FiscalQuarter, o.Fiscal, o.FAS__c, o.Expire_Date__c, o.Do_not_Show_Total__c, o.Description, o.Delivery_specifications__c, o.Customer_Reference__c, o.CurrencyIsoCode, o.Contractual_Agreement__c, o.Competitor__c, o.Competitor_Products_involved__c, o.Competitor_Pricing__c, o.Competition__c, o.CloseDate, o.Categorisation__c, o.Budget__c, o.Amount, o.AccountId From Opportunity o where id=:getOpportunityId()];
if (opp.Id != null){
Opportunity newOpp = opp.clone(false,true);
newOpp.Name=opp.Name + ' CLONE';
insert newOpp;
}
As you see I need to put in there all the fields to be cloned.
The problem is : if in the future I create a new field, this one will not be transmitted with the clone ! (unless I edit the query here and add this new field) !!!!!! Is there any solution for this ?
Tkx a lot to you all for your answers and support !
Message Edited by Mig on 01-19-2009 06:49 PM
- Mig
- January 19, 2009
- Like
- 0
- Continue reading or reply