• Jeff Waalkes
  • NEWBIE
  • 0 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 2
    Replies
I am working on building an apex code that checks incoming emails that have a null or blank value in the subject line and will set a placeholder value in the subject line that will be the new case subject line. 
What am I missing in this field and what is the potential duplicate trigger that is being used. 
Thanks User-added image
I am working on setting up a trigger for incoming emails that create cases. I need to check if the email subject field is blank or "null" and put a placeholder text within the incoming email subject line that will then be the case subject line and will have case SLA's tied to those cases. 

I have tried this Apex before trigger: 
trigger AssociateEmail on EmailMessage (before insert) {

 
    for(EmailMessage eMsg : Trigger.new) {
        
               if(eMsg.Incoming && (eMsg.subject == '' || eMsg.subject ==  null)){
               
                 eMsg.subject = 'Add your subject here';
               }       
       
    }

 
}
But this has not placed a placeholder subject on the case and I still have no SLA's tied to the case when no case subject line is set. 

What am I missing to accomplish this?
I need to set a before trigger on incoming emails that sets a value to an email that has a null subject line. What is the proper apex code to set this trigger that will take an incoming email with nothing in the subject line and set placeholder verbiage 
I have a flow that is automating the milestone completion when an email or call is logged. I am getting an iterations error with a loop within the flow. I know the error is cause by the count exceeding the 2000 number that is set within service cloud. The flow is supposed to search the contacts on the TO: or CC: line within an email to check and verify a contact within the case or association is linked within the reply and if so mark the milestone as complete. However, with this error it seems that it is looping through all of the contacts and erroring out. Any help regarding this would be appreciated. 
We created a flow back in early June to help automate the updating the milestone completion after an email or phone call was created within a service case. The outcome that we had expected to have was the ability to email or log a call within the case from our customer emailing into a case and have the milestone mark as complete once that communication was logged.
What is occurring on some of the cases is we will get an error that will not allow us to send or update the milestones and communication will not log as complete to our customers. The work around that we have for this is to remove people from the list of email recipients to reduce who is receiving communication.
This is not occurring within every case but on some, I am needing help to understand what is causing this error and how to fix the flow. My theory at the moment is the flow is going through the contacts within our account that we have and not finding a last item to release from the loop inside the flow.


On the times that I do get this error the workaround has been to remove contacts within the email lines and retry the action. This is a trial and error method. There is at times a distribution list email that is connected to the contact. This may be part of the issue. I do know the count cannot exceed a count of 2000. 

User-added image

 
Is it possible to migrate articles from OneNote to Salesforce?  I have a list of pages that I am wanting to import. 
 
I am working on adding documents in Salesforce and am wanting to add keywords to search that will bring up articles and not just words within the articles. 
I am working on setting up a trigger for incoming emails that create cases. I need to check if the email subject field is blank or "null" and put a placeholder text within the incoming email subject line that will then be the case subject line and will have case SLA's tied to those cases. 

I have tried this Apex before trigger: 
trigger AssociateEmail on EmailMessage (before insert) {

 
    for(EmailMessage eMsg : Trigger.new) {
        
               if(eMsg.Incoming && (eMsg.subject == '' || eMsg.subject ==  null)){
               
                 eMsg.subject = 'Add your subject here';
               }       
       
    }

 
}
But this has not placed a placeholder subject on the case and I still have no SLA's tied to the case when no case subject line is set. 

What am I missing to accomplish this?
I need to set a before trigger on incoming emails that sets a value to an email that has a null subject line. What is the proper apex code to set this trigger that will take an incoming email with nothing in the subject line and set placeholder verbiage