-
ChatterFeed
-
0Best Answers
-
1Likes Received
-
0Likes Given
-
14Questions
-
22Replies
Looks like something went wrong, please try again later.
I am receiving the error "Looks like something went wrong, please try again later." when checking my "Automate the creation of fulfillments" challenge within the Lightning Experience Specialist Super Badge. Anyone have any ideas?
-
- JosephT
- January 31, 2018
- Like
- 1
- Continue reading or reply
Checkbox Trigger for Related CRM Content
-
- JosephT
- May 14, 2015
- Like
- 0
- Continue reading or reply
Time Between Opportunities
Any Ideas would be greatly appreciated.
-
- JosephT
- March 19, 2015
- Like
- 0
- Continue reading or reply
Bulkify Case Trigger.
Here is my Trigger;
trigger NumberOfSolutions on case(before update) {
if(Trigger.isUpdate)
{
List<Case> objCase= new List<Case>();
for(Case c:Trigger.New)
{
Integer intNum = 0;
intNum =[select Count() from casesolution where caseID =:c.id];
c.Number_of_Solutions__c =intNum;
objCase.add(c);
}
}
}
Any help would be greatly appreciated.
Joseph
-
- JosephT
- February 16, 2015
- Like
- 0
- Continue reading or reply
Compile Error on Campaign Roll-Up Summary Trigger
LINE 15: for (Campaign c : Campaigns.values())
HERE IS MY FULL CODE:trigger TotalCampaignServicePackagesAmountforTitleServices on Opportunity (after insert, after update) {
List<Campaign> campIds = new List<Campaign>();
for (Opportunity o : trigger.new){
if (o.CampaignID != null && (trigger.isInsert || o.Service_Packages_Amount__c != trigger.oldMap.get(o.id).Service_Packages_Amount__c))
campIds.add(o.Campaign);
}
if (campIds.size() > 0) {
Map<Id,Campaign> mapCampaigns = new Map<Id,Campaign>([select id from Campaign where Id in :campIds]);
for (Campaign c : Campaigns.values())
c.Total_Value_Services__c = 0;
for (Opportunity o : [SELECT id, Service_Packages_Amount__c, CampaignId FROM Opportunity WHERE CampaignId =: campIds]){
Campaign c = campaigns.get(o.CampaignId); c.Total_Value_Services__c += o.Service_Packages_Amount__c;
}
update campaigns.values();
}
}
Any help would be greatly appreciated.
-
- JosephT
- March 13, 2014
- Like
- 0
- Continue reading or reply
Isse with (After Update) and Test
TRIGGER:
trigger VAS_InsertProjectionIdsOnServices on VAS_Services__c (after update) {
List <VAS_Sales_Projections__c> sales_projections = [Select Id, Package_Name__c, Month__c FROM VAS_Sales_Projections__c];
for (VAS_Services__c S: Trigger.new)
{
for (VAS_Sales_Projections__c P: sales_projections)
{
if (P.Package_Name__c == S.Service_Name__c && P.Month__c.month() == S.Purchase_Date__c.month()&& P.Month__c.year() == S.Purchase_Date__c.year())
{
//Do logic here
S.VAS_Sales_Projections__c = P.Id;
S = [SELECT Id From VAS_Services__c LIMIT 1];
Update S;
}
}
}
}
TEST CLASS
@isTest(SeeAllData=true)
private class VAS_InsertProjectionIdsOnServicesTest{
public static testmethod void test() {
//Create VAS Sales Projection
VAS_Sales_Projections__c P = new VAS_Sales_Projections__c (Package_Name__c = 'Complimentary Copies', Month__c=Date.today());
//Create VAS Services
VAS_Services__c S = new VAS_Services__c(Service_Name__c='Complimentary Copies', Purchase_Date__c= DateTime.Now());
//Relate Records
S.VAS_Sales_Projections__c = P.Id;
S = [SELECT Id From VAS_Services__c LIMIT 1];
}
}
So, the Test passes BUT, is not relating to the Trigger... The trigger won;t even show up in the Develoepr Console when I open it????
-
- JosephT
- March 04, 2014
- Like
- 0
- Continue reading or reply
Workflow issue with IF Statement
However, at the end of my If statement (IF(logical_test, value_if_true, value_if_false)), I have my 'value if false' set as "NULL".
Therefore, when ever the field update is launched, it inserts null values into the field.
How can I write an IF statement AND have the field not updated if the value if false?
-
- JosephT
- February 04, 2014
- Like
- 0
- Continue reading or reply
Issue with Trigger from Sent Email to Update Generated Task
I created a custon check box at the Activity level called "Survey Offered".
I need for this field to be flagged as true/checked IF an email contains certain characters/text.
Therefore, I started to create a trigger to update the task.Survey_Offered__c = true;
But, I keep tripping over the coding...
Here is what I have been able to save so far;
trigger SurveyOffered on EmailMessage (before insert) {
for(EmailMessage message : trigger.new){
if(message.TextBody == 'createspace.force.com/HMD') {
message.ActivityId= 'SFDC_Support';
} //end trigger
}
}
NOW, everytime I try to insert a line to update Survey_Offered__c I am receiving error messages...
Any ideas?
-
- JosephT
- August 22, 2013
- Like
- 0
- Continue reading or reply
Filter Trigger to Run by Specific Profile
I created the following Trigger for Lead Based Activites but now, I would like to filter the trigger to only run/be applied to a specific Profile... BUT, I am not exactly sure where I would add it?
Here is my current APEX Trigger;
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | trigger taskTrigger on Task (after insert, after update, after delete) { if ((Trigger.isInsert || Trigger.isUpdate || Trigger.isDelete) && Trigger.isAfter) { set<Id> LeadIds = new set<Id>(); if(trigger.isInsert || trigger.isUpdate){ for(Task p : trigger.new){ LeadIds.add(p.WhoId); } } if(trigger.isDelete){ for(Task p : trigger.old){ LeadIds.add(p.WhoId); } } map<Id,Double> LeadMap = new map<Id,Double> (); CRMfusionDBR101.DB_Globals.triggersDisabled = true; for(AggregateResult q : [select WhoId,sum(Task_Name_Count__c) from Task WHERE CreatedDate = TODAY AND status = 'Completed' AND (Task_Type__c = 'Call' OR Task_Type__c = 'Call: Reached' OR Task_Type__c = 'Appointment Kept' OR Task_Type__c = 'Appointment Scheduled' OR Task_Type__c = 'VM' OR Task_Type__c = 'Email') AND WhoId IN :LeadIds group by WhoId]){ LeadMap.put((Id)q.get('WhoId'),(Double)q.get('expr0')); } List <Lead> LeadsToUpdate = new List <Lead> (); for(lead l : [Select Id, Task_Counter__c from Lead where Id IN :LeadIds AND (Status = 'To Be Contacted' OR Status = 'Contact Made'OR Status = 'Contact Attempted')]){ Double Sum = LeadMap.get(l.Id); l.Task_Counter__c = Sum; LeadsToUpdate.add(l); } update LeadsToUpdate; CRMfusionDBR101.DB_Globals.triggersDisabled = false; } } |
-
- JosephT
- January 23, 2013
- Like
- 0
- Continue reading or reply
Calling Last Case View/Session ID from VF Button
I created a new 'Return to Case View" button on the Case Feed Publishers. I am trying to allow users to return to the Last Case View they were looking. However, when I click my button, the case view is displayed within an iframe... How can I refresh the entire URL and bring them back to their 'last' case view?
-
- JosephT
- January 21, 2013
- Like
- 0
- Continue reading or reply
Trigger for Outgoing Tasks to Lead Counter field.
I want to create a counter field at the lead level. This field would count the total of all 'Outgoing' tasks for a lead prior to the lead reaching a 'Qualified' lead status. Activities to be included are Call, Call: Attempted, Call: Reached, Appointment Kept, Appointment Scheduled, Voicemail left AND Emails. It appears that I would need to create a Trigger to do this BUT, I am not a coding man... Any ideas?
-
- JosephT
- October 29, 2012
- Like
- 0
- Continue reading or reply
Case Assigment Rule Inquiry
-
- JosephT
- September 21, 2007
- Like
- 0
- Continue reading or reply
Help with Report Formulas
Basically, when I run a report that includes contacts and their associated activities, instead of showing all contacts with all activities, I would like to see only contacts whose "record count" or "rowcount" is greater than 5. This would permit me to see my most active/high-touch contacts.
I have attempted a few fomula's to acheive this result to no avail? Anyone ever tackled this before that may have some suggestions?
-
- JosephT
- August 28, 2007
- Like
- 0
- Continue reading or reply
Filtering out Report Record Counts
-
- JosephT
- August 27, 2007
- Like
- 0
- Continue reading or reply
Looks like something went wrong, please try again later.
I am receiving the error "Looks like something went wrong, please try again later." when checking my "Automate the creation of fulfillments" challenge within the Lightning Experience Specialist Super Badge. Anyone have any ideas?
-
- JosephT
- January 31, 2018
- Like
- 1
- Continue reading or reply
Looks like something went wrong, please try again later.
I am receiving the error "Looks like something went wrong, please try again later." when checking my "Automate the creation of fulfillments" challenge within the Lightning Experience Specialist Super Badge. Anyone have any ideas?
- JosephT
- January 31, 2018
- Like
- 1
- Continue reading or reply
Trailhead unable to Check Challenge
https://trailhead.salesforce.com/modules/service_basics/units/service_basics_intro
Check Challenge button does not complete and returns message:
'Looks like we're having issues, please try again. If this issue persists, please contact us using the submit feedback section on the sidebar.'
Please advise
- Al Swain
- January 31, 2018
- Like
- 4
- Continue reading or reply
Time Between Opportunities
Any Ideas would be greatly appreciated.
- JosephT
- March 19, 2015
- Like
- 0
- Continue reading or reply
Bulkify Case Trigger.
Here is my Trigger;
trigger NumberOfSolutions on case(before update) {
if(Trigger.isUpdate)
{
List<Case> objCase= new List<Case>();
for(Case c:Trigger.New)
{
Integer intNum = 0;
intNum =[select Count() from casesolution where caseID =:c.id];
c.Number_of_Solutions__c =intNum;
objCase.add(c);
}
}
}
Any help would be greatly appreciated.
Joseph
- JosephT
- February 16, 2015
- Like
- 0
- Continue reading or reply
Compile Error on Campaign Roll-Up Summary Trigger
LINE 15: for (Campaign c : Campaigns.values())
HERE IS MY FULL CODE:trigger TotalCampaignServicePackagesAmountforTitleServices on Opportunity (after insert, after update) {
List<Campaign> campIds = new List<Campaign>();
for (Opportunity o : trigger.new){
if (o.CampaignID != null && (trigger.isInsert || o.Service_Packages_Amount__c != trigger.oldMap.get(o.id).Service_Packages_Amount__c))
campIds.add(o.Campaign);
}
if (campIds.size() > 0) {
Map<Id,Campaign> mapCampaigns = new Map<Id,Campaign>([select id from Campaign where Id in :campIds]);
for (Campaign c : Campaigns.values())
c.Total_Value_Services__c = 0;
for (Opportunity o : [SELECT id, Service_Packages_Amount__c, CampaignId FROM Opportunity WHERE CampaignId =: campIds]){
Campaign c = campaigns.get(o.CampaignId); c.Total_Value_Services__c += o.Service_Packages_Amount__c;
}
update campaigns.values();
}
}
Any help would be greatly appreciated.
- JosephT
- March 13, 2014
- Like
- 0
- Continue reading or reply
Workflow issue with IF Statement
However, at the end of my If statement (IF(logical_test, value_if_true, value_if_false)), I have my 'value if false' set as "NULL".
Therefore, when ever the field update is launched, it inserts null values into the field.
How can I write an IF statement AND have the field not updated if the value if false?
- JosephT
- February 04, 2014
- Like
- 0
- Continue reading or reply
Issue with Trigger from Sent Email to Update Generated Task
I created a custon check box at the Activity level called "Survey Offered".
I need for this field to be flagged as true/checked IF an email contains certain characters/text.
Therefore, I started to create a trigger to update the task.Survey_Offered__c = true;
But, I keep tripping over the coding...
Here is what I have been able to save so far;
trigger SurveyOffered on EmailMessage (before insert) {
for(EmailMessage message : trigger.new){
if(message.TextBody == 'createspace.force.com/HMD') {
message.ActivityId= 'SFDC_Support';
} //end trigger
}
}
NOW, everytime I try to insert a line to update Survey_Offered__c I am receiving error messages...
Any ideas?
- JosephT
- August 22, 2013
- Like
- 0
- Continue reading or reply
Filter Trigger to Run by Specific Profile
I created the following Trigger for Lead Based Activites but now, I would like to filter the trigger to only run/be applied to a specific Profile... BUT, I am not exactly sure where I would add it?
Here is my current APEX Trigger;
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | trigger taskTrigger on Task (after insert, after update, after delete) { if ((Trigger.isInsert || Trigger.isUpdate || Trigger.isDelete) && Trigger.isAfter) { set<Id> LeadIds = new set<Id>(); if(trigger.isInsert || trigger.isUpdate){ for(Task p : trigger.new){ LeadIds.add(p.WhoId); } } if(trigger.isDelete){ for(Task p : trigger.old){ LeadIds.add(p.WhoId); } } map<Id,Double> LeadMap = new map<Id,Double> (); CRMfusionDBR101.DB_Globals.triggersDisabled = true; for(AggregateResult q : [select WhoId,sum(Task_Name_Count__c) from Task WHERE CreatedDate = TODAY AND status = 'Completed' AND (Task_Type__c = 'Call' OR Task_Type__c = 'Call: Reached' OR Task_Type__c = 'Appointment Kept' OR Task_Type__c = 'Appointment Scheduled' OR Task_Type__c = 'VM' OR Task_Type__c = 'Email') AND WhoId IN :LeadIds group by WhoId]){ LeadMap.put((Id)q.get('WhoId'),(Double)q.get('expr0')); } List <Lead> LeadsToUpdate = new List <Lead> (); for(lead l : [Select Id, Task_Counter__c from Lead where Id IN :LeadIds AND (Status = 'To Be Contacted' OR Status = 'Contact Made'OR Status = 'Contact Attempted')]){ Double Sum = LeadMap.get(l.Id); l.Task_Counter__c = Sum; LeadsToUpdate.add(l); } update LeadsToUpdate; CRMfusionDBR101.DB_Globals.triggersDisabled = false; } } |
- JosephT
- January 23, 2013
- Like
- 0
- Continue reading or reply
Calling Last Case View/Session ID from VF Button
I created a new 'Return to Case View" button on the Case Feed Publishers. I am trying to allow users to return to the Last Case View they were looking. However, when I click my button, the case view is displayed within an iframe... How can I refresh the entire URL and bring them back to their 'last' case view?
- JosephT
- January 21, 2013
- Like
- 0
- Continue reading or reply
Trigger for Outgoing Tasks to Lead Counter field.
I want to create a counter field at the lead level. This field would count the total of all 'Outgoing' tasks for a lead prior to the lead reaching a 'Qualified' lead status. Activities to be included are Call, Call: Attempted, Call: Reached, Appointment Kept, Appointment Scheduled, Voicemail left AND Emails. It appears that I would need to create a Trigger to do this BUT, I am not a coding man... Any ideas?
- JosephT
- October 29, 2012
- Like
- 0
- Continue reading or reply