• JosephT
  • NEWBIE
  • 15 Points
  • Member since 2007

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 14
    Questions
  • 22
    Replies

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?

 

On Trailhead:

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
I am trying to devise a way to show the average time frame between each opportunity that is created under any given account.  So, if I look at Account A and it has three opportunities associated to it, I would be able to see the average time (days) between the creation of each opportunity.

Any Ideas would be greatly appreciated.
I have a case trigger to count the number of related solutions but, I am receiving a SOQL number of quiries error on an import via data loader.  Therefore, I appear to have an issue with bulkifiying this 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
I am receiving the error "Error: Compile Error: Variable does not exist: Campaigns at line 15 column 21" for this line of code in my 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.




I have a workflow that launches multiple field updates on the same field IF the matching criteria is met...

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?

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?

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;


}
}

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?

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?