• MiguelGuerreiro
  • NEWBIE
  • 25 Points
  • Member since 2007

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 34
    Questions
  • 65
    Replies

Hello,

 

We are running a email to case agent, behind our firewall, with around 12 support email addresses. The agent will look for new email every 5 minutes.

Sometimes we receive a lot of messages in one mailbox (with heavy attachments). Since it takes a few minutes to scan all those emails the other mailbox keep stacking up. It takes a few minutes or hours to get a normal flow of email in to salesforce.

 

We are thinking of splitting the email addresses in several email to case agents.

 

Does anyone have another solution we could try?

 

Thanks!

Hello,

 

I have created a web form for an object. The field in this object are translated into several languages.

 

How can I, using one web form only, have it display several languages?

 

Thanks!

Hello,

 

I have developed a trigger on Attachments. My idea is to update a case field when a new attachment is insert on a case. It works OK, not perfect.

 

I can't deploy it to production because I'm not able to create a test class for it... I tried but I'm only starting with Apex now. The code is below, can someone help me build a test class for it?

 

 

trigger NewAttachment on Attachment (before insert) {List<Case> CasesToUpdate = new List<Case>();for (Attachment t: Trigger.new){try{Case c = new Case(Id = t.ParentId);c.HasAttachments__c = true;CasesToUpdate.add(c);}catch (Exception e) {}}update CasesToUpdate;}//end

 

Thanks! 

 

 

Hello,

 

I'm using CMSForce to create a web form for a custom object (which has a look up field for Contacts). Is there a way to automatically link the custom object to the correct contact when he saves the record in the web form? Maybe using his email address?

 

Thanks!

Hello,

 

Is there anything in appexchange to simply create HTML code for any kind of object (standard or custom)?

 

I've looked up without success but hopefully I'm missing something.

 

Miguel

hello,

 

im trying to create a trigger to prevent users from adding comments on closed cases.

 

this is my code:

 

trigger CloseComment on CaseComment (before insert) {


for (CaseComment t: Trigger.new)
{
Case c = new Case(Id = t.ParentId);

if(c.Status == 'Closed' && c.Process__c == 'Payroll')
{
t.addError(c.Process__c + 'case closed' + c.Status);
}
else
t.addError(c.Process__c + 'case open' + c.Status);
}
}

 

but i can't get the values of any case fields. I guess im missing something simple.

 

Any ideas?

Message Edited by MiguelGuerreiro on 01-14-2010 09:20 AM
Hello,   I need to archive (remove from salesforce) around 400.000 email messages. I tried the weekly export but files are too big and it's not possible to open them (in case I need to import some information back to salesforce). The main issue is that the email message body is not stored in one cell (one single email message is scattered in several rows). The same happens with Data Loader.  Does anyone ever try this? What are my options? I'm running out of space and I really need to free up some space...

Hello,

 

Anyone using Case Age In Business Hours package from appexchange is having problems with Email2Case?

 

We're getting a lot of errors because of too many SQL queries...

 

Thank you for any help!

 

 

 

Log file:

 

 

2009-09-23 13:45:36,770 145373 [Timer-0] ERROR com.sforce.mail.GenericClient - Wed Sep 23 13:45:36 WEST 2009:Error:0: CalculateBusinessHoursAges: execution of BeforeUpdate caused by: System.Exception: Too many SOQL queries: 21 Trigger.CalculateBusinessHoursAges: line 20, column 32 2009-09-23 13:45:36,792 145395 [Timer-0] ERROR com.sforce.mail.GenericClient - Wed Sep 23 13:45:36 WEST 2009:Error:1: CalculateBusinessHoursAges: execution of BeforeUpdate caused by: System.Exception: Too many SOQL queries: 21 Trigger.CalculateBusinessHoursAges: line 20, column 32 2009-09-23 13:45:36,792 145395 [Timer-0] ERROR com.sforce.mail.GenericClient - Wed Sep 23 13:45:36 WEST 2009:Error:2: CalculateBusinessHoursAges: execution of BeforeUpdate caused by: System.Exception: Too many SOQL queries: 21 Trigger.CalculateBusinessHoursAges: line 20, column 32 2009-09-23 13:45:36,792 145395 [Timer-0] ERROR com.sforce.mail.GenericClient - Wed Sep 23 13:45:36 WEST 2009:Error:3: CalculateBusinessHoursAges: execution of BeforeUpdate caused by: System.Exception: Too many SOQL queries: 21 Trigger.CalculateBusinessHoursAges: line 20, column 32 2009-09-23 13:45:36,792 145395 [Timer-0] ERROR com.sforce.mail.GenericClient - Wed Sep 23 13:45:36 WEST 2009:Error:4: CalculateBusinessHoursAges: execution of BeforeUpdate caused by: System.Exception: Too many SOQL queries: 21 Trigger.CalculateBusinessHoursAges: line 20, column 32 2009-09-23 13:45:36,792 145395 [Timer-0] INFO com.sforce.mail.GenericClient - Copying 5 messages to error mailbox 2009-09-23 13:46:21,784 190387 [Timer-0] INFO com.sforce.mail.GenericClient - Wed Sep 23 13:46:21 WEST 2009:Success:0 ID=02s20000002VbynAAC Success=true 2009-09-23 13:46:21,784 190387 [Timer-0] INFO com.sforce.mail.GenericClient - Wed Sep 23 13:46:21 WEST 2009:Success:1 ID=02s20000002VbyoAAC Success=true 2009-09-23 13:46:21,784 190387 [Timer-0] INFO com.sforce.mail.GenericClient - Wed Sep 23 13:46:21 WEST 2009:Success:2 ID=02s20000002Vc2DAAS Success=true

 

 

The line that gives the error is:

 

 

for (CaseStatus status:[Select MasterLabel From CaseStatus where IsClosed=true]) { closedStatusSet.add(status.MasterLabel); }

 

 

 

 

 

 

Hello,

 

Anyone using Case Age In Business Hours package from appexchange is having problems with Email2Case?

 

 

We're getting a lot of errors because of too many SQL queries...

 

Thank you for any help!

 

2009-09-23 13:45:36,770 145373 [Timer-0] ERROR com.sforce.mail.GenericClient - Wed Sep 23 13:45:36 WEST 2009:Error:0: CalculateBusinessHoursAges: execution of BeforeUpdate

caused by: System.Exception: Too many SOQL queries: 21

Trigger.CalculateBusinessHoursAges: line 20, column 32
2009-09-23 13:45:36,792 145395 [Timer-0] ERROR com.sforce.mail.GenericClient - Wed Sep 23 13:45:36 WEST 2009:Error:1: CalculateBusinessHoursAges: execution of BeforeUpdate

caused by: System.Exception: Too many SOQL queries: 21

Trigger.CalculateBusinessHoursAges: line 20, column 32
2009-09-23 13:45:36,792 145395 [Timer-0] ERROR com.sforce.mail.GenericClient - Wed Sep 23 13:45:36 WEST 2009:Error:2: CalculateBusinessHoursAges: execution of BeforeUpdate

caused by: System.Exception: Too many SOQL queries: 21

Trigger.CalculateBusinessHoursAges: line 20, column 32
2009-09-23 13:45:36,792 145395 [Timer-0] ERROR com.sforce.mail.GenericClient - Wed Sep 23 13:45:36 WEST 2009:Error:3: CalculateBusinessHoursAges: execution of BeforeUpdate

caused by: System.Exception: Too many SOQL queries: 21

Trigger.CalculateBusinessHoursAges: line 20, column 32
2009-09-23 13:45:36,792 145395 [Timer-0] ERROR com.sforce.mail.GenericClient - Wed Sep 23 13:45:36 WEST 2009:Error:4: CalculateBusinessHoursAges: execution of BeforeUpdate

caused by: System.Exception: Too many SOQL queries: 21

Trigger.CalculateBusinessHoursAges: line 20, column 32
2009-09-23 13:45:36,792 145395 [Timer-0] INFO com.sforce.mail.GenericClient - Copying 5 messages to error mailbox
2009-09-23 13:46:21,784 190387 [Timer-0] INFO com.sforce.mail.GenericClient - Wed Sep 23 13:46:21 WEST 2009:Success:0 ID=02s20000002VbynAAC Success=true
2009-09-23 13:46:21,784 190387 [Timer-0] INFO com.sforce.mail.GenericClient - Wed Sep 23 13:46:21 WEST 2009:Success:1 ID=02s20000002VbyoAAC Success=true
2009-09-23 13:46:21,784 190387 [Timer-0] INFO com.sforce.mail.GenericClient - Wed Sep 23 13:46:21 WEST 2009:Success:2 ID=02s20000002Vc2DAAS Success=true

 


 

Message Edited by MiguelGuerreiro on 09-23-2009 01:54 PM

Hello,

 

I'm really new to Apex so I request once more the community help! 

 

I've done this trigger below to prevent duplicete contacts (based on the email). Does anyone see a big flaw in it?

 

 

trigger PreventDuplicates on Contact (before insert, before update) { Contact[] contacts = [select Email,Id from Contact]; for(Contact c: Trigger.new) { for(Integer i = 0; i < contacts.size(); i++) { if(contacts[i].Email == c.Email) { c.Email.addError('Duplicated email address.'); } } } }

 

 

 

 

 

Hello,

 

I've created a trigger to prevent duplicated entries on contacts. How can I additionally create a link (on the error message) to the existing contact?

 

Thanks! 

Hello,

 

I have a trigger (before insert, before update) to update some number fields. The field to update depends on the case owner role. This is the code that is getting the error:

 

 

for (Case updatedCase:System.Trigger.new) { Case oldCase = System.Trigger.oldMap.get(updatedCase.Id); User usr = [select Id,UserRoleId from User where Id =:oldCase.OwnerId]; UserRole role = [select Id,Name from UserRole where Id =:usr.UserRoleId];

 Is errors when the owner is a Queue. Is there a easy way to solve this?

 

thanks!

 

Miguel

 

 

hello,

 

I have a web page written in PHP with several fields so that my customers can created cases. One of the fields should be a data type but we're getting error messages so we switched to string. How does one define a data type field so that the case is correctly created in salesforce?

 

thank you

hello,

 

I have a user field (checkbox) that indicates if the users is Out of the Office. 

 

Is it possible that when a user assign a object (case) to that user the system would prevent this (via validation rule or with another method?

 

Maybe an trigger?

 

thank you!

hello,

 

is there any way to be alert (via email) when a email message did not generate a case because the attachment is over 5Mb?

 

thank you!

Hello,

 

As anyone noticed that when you reply, in a case, to a received email sent by someone other than the case contact that the email "TO" or "Addiitional to" fields don't get populated?

 

Miguel  

Hello,

 

We currently have several instances of salesforce mainly to use Call Center. We have enabled email2case in both instances.

 

We have now come across a problem with the email exchange between the two systems. When you email to another instance salesforce places a reference in the subject. When you reply, from the other instance, salesforce does not place a reference at all (probably because he finds one there).

 

Salesforce-to-salesforce could be the solution but it doesn’t support cases.

 

Anyone had this situation before? How to overcome it?

 

Thanks!

 

Miguel

Hello,

 

We've been getting this error in the log file since this morning, probably something that was changed in our Exchange server but we haven't figured outwhat it is:

 

"Message: Logon failure: unknown user name or bad password."

 

The username and password are correct and everything is correct in our email2case settings.

 

Any ideas? Our email provider seems to be out of solutions...

 

Thank you!!

Hello,

I would like to create an email template containing a link to a document stored in our salesforce documents. This email will be sent to non salesforce users but they are prompted with a login page. How can I do this?

Thanks!
Hello!

I have a question here that I could not solve with a simple validation rule:

I have a picklist field and a text field. I want to stop users (customer portal users) from creating cases when this condition/formula is not true:

IF picklist value contains text value = true

Is it possible?


Hello,

I am trying to create a workflow on object "Cases". I have a look up field on Cases called Internal_Originator_c. I want to notify this person whenever the case ownership changes. In the workflow formula, I am writing ISCHANGED(OwnerID) but I am getting the following error.

 

Error: Function ISCHANGED may not be used in this type of formula

 

Why? Can someone sugget a better solution, please? I really appreciate the help.

Hi, The organization that I work used Email to case to track support issues. They would like new cases (=new emails) to stand out as unread, similar to the way that unread emails stand out in Gmail. Is there any way for me to build a field that can figure out if the case was read or not? Thanks! Sara

Hello,

 

I have created a web form for an object. The field in this object are translated into several languages.

 

How can I, using one web form only, have it display several languages?

 

Thanks!

Hello,

 

I have developed a trigger on Attachments. My idea is to update a case field when a new attachment is insert on a case. It works OK, not perfect.

 

I can't deploy it to production because I'm not able to create a test class for it... I tried but I'm only starting with Apex now. The code is below, can someone help me build a test class for it?

 

 

trigger NewAttachment on Attachment (before insert) {List<Case> CasesToUpdate = new List<Case>();for (Attachment t: Trigger.new){try{Case c = new Case(Id = t.ParentId);c.HasAttachments__c = true;CasesToUpdate.add(c);}catch (Exception e) {}}update CasesToUpdate;}//end

 

Thanks! 

 

 

Hello,

 

I'm using CMSForce to create a web form for a custom object (which has a look up field for Contacts). Is there a way to automatically link the custom object to the correct contact when he saves the record in the web form? Maybe using his email address?

 

Thanks!

Hi,

we have a problem in our company that i dont know how to resolve.

Step 1: We have to modify a field in all the new lead that comes, its working.

Step 2: This modification will fire a trigger that create documens asociated to the lead,

working but when are more than 10 documents the next error fire: "Too many SOQL queries: 21"

 

Then next step work but only if we do it throught a independient workflow but we dont know how to do that the last trigger do it: 

 

Step 3: We need that the process create 4 based timed WorkFlows that will send an email to the lead, working.

 

WF Process

 

 

Any suggestion??

Thanks a lot

 

  • February 12, 2010
  • Like
  • 0

I am unable to find a solution that allows me to determine whether a case is related to Support or Services. Both our Support teams and a services team use SFDC for case management (project related cases and support related cases).

 

Internally I can track whether this is a Support case or a service case based on Record Types but when a client logs into the self service portal to log a issue or view a issue I am unable to display the ticket 'group'owner. How can they select whether the case being submitted is a Support case or a service case so the correct teams are notified and the issue worked?

Message Edited by NIKAL on 01-13-2010 11:07 AM
  • January 13, 2010
  • Like
  • 0

hello,

 

im trying to create a trigger to prevent users from adding comments on closed cases.

 

this is my code:

 

trigger CloseComment on CaseComment (before insert) {


for (CaseComment t: Trigger.new)
{
Case c = new Case(Id = t.ParentId);

if(c.Status == 'Closed' && c.Process__c == 'Payroll')
{
t.addError(c.Process__c + 'case closed' + c.Status);
}
else
t.addError(c.Process__c + 'case open' + c.Status);
}
}

 

but i can't get the values of any case fields. I guess im missing something simple.

 

Any ideas?

Message Edited by MiguelGuerreiro on 01-14-2010 09:20 AM
Hello,   I need to archive (remove from salesforce) around 400.000 email messages. I tried the weekly export but files are too big and it's not possible to open them (in case I need to import some information back to salesforce). The main issue is that the email message body is not stored in one cell (one single email message is scattered in several rows). The same happens with Data Loader.  Does anyone ever try this? What are my options? I'm running out of space and I really need to free up some space...

Hi,

 

We have enabled cases for Partner Portal. But during a new case creation, we want to hide the option "Send notification email to contact" checkbox that appears at the bottom of the new Case page lyout.

 

How can we do this without having to convert the page to visualforce?

 

Thanks

I am looking for a solution: I have a workflow rule setup to send an email when a date field is changed. The problem is it sends the alert when the date is entered as well as when it is changed. Any idea how to suppress the the email alert when the date is initially entered?

 

Thanks for any guidance you may be able to offer.

Hello,

 

Anyone using Case Age In Business Hours package from appexchange is having problems with Email2Case?

 

 

We're getting a lot of errors because of too many SQL queries...

 

Thank you for any help!

 

2009-09-23 13:45:36,770 145373 [Timer-0] ERROR com.sforce.mail.GenericClient - Wed Sep 23 13:45:36 WEST 2009:Error:0: CalculateBusinessHoursAges: execution of BeforeUpdate

caused by: System.Exception: Too many SOQL queries: 21

Trigger.CalculateBusinessHoursAges: line 20, column 32
2009-09-23 13:45:36,792 145395 [Timer-0] ERROR com.sforce.mail.GenericClient - Wed Sep 23 13:45:36 WEST 2009:Error:1: CalculateBusinessHoursAges: execution of BeforeUpdate

caused by: System.Exception: Too many SOQL queries: 21

Trigger.CalculateBusinessHoursAges: line 20, column 32
2009-09-23 13:45:36,792 145395 [Timer-0] ERROR com.sforce.mail.GenericClient - Wed Sep 23 13:45:36 WEST 2009:Error:2: CalculateBusinessHoursAges: execution of BeforeUpdate

caused by: System.Exception: Too many SOQL queries: 21

Trigger.CalculateBusinessHoursAges: line 20, column 32
2009-09-23 13:45:36,792 145395 [Timer-0] ERROR com.sforce.mail.GenericClient - Wed Sep 23 13:45:36 WEST 2009:Error:3: CalculateBusinessHoursAges: execution of BeforeUpdate

caused by: System.Exception: Too many SOQL queries: 21

Trigger.CalculateBusinessHoursAges: line 20, column 32
2009-09-23 13:45:36,792 145395 [Timer-0] ERROR com.sforce.mail.GenericClient - Wed Sep 23 13:45:36 WEST 2009:Error:4: CalculateBusinessHoursAges: execution of BeforeUpdate

caused by: System.Exception: Too many SOQL queries: 21

Trigger.CalculateBusinessHoursAges: line 20, column 32
2009-09-23 13:45:36,792 145395 [Timer-0] INFO com.sforce.mail.GenericClient - Copying 5 messages to error mailbox
2009-09-23 13:46:21,784 190387 [Timer-0] INFO com.sforce.mail.GenericClient - Wed Sep 23 13:46:21 WEST 2009:Success:0 ID=02s20000002VbynAAC Success=true
2009-09-23 13:46:21,784 190387 [Timer-0] INFO com.sforce.mail.GenericClient - Wed Sep 23 13:46:21 WEST 2009:Success:1 ID=02s20000002VbyoAAC Success=true
2009-09-23 13:46:21,784 190387 [Timer-0] INFO com.sforce.mail.GenericClient - Wed Sep 23 13:46:21 WEST 2009:Success:2 ID=02s20000002Vc2DAAS Success=true

 


 

Message Edited by MiguelGuerreiro on 09-23-2009 01:54 PM

Hello Team,

 

After downloading and installing the AppExchange package 'Currency Exhcange Rate Updater' into my SandoBox account, and configuring it according to the Configuration Guide, it fails to connect to http://download.finance.com.  As such, I have contacted SalesForce.com support who informed me that this was the place to get help with this issue.  Has anyone here run into this same problem, and if so, is there a solution that you can share?  Thanks in advance,

 

Daniel Orrego

Finance Technical Director

Cornerstone Information Systems

812.345.3425