Search Community
- Force.com Discussion Boards
- :
- Salesforce User Discussions
- :
- Best Practices Discussion
- :
- Creating a Custom Case Field "To" Email Address
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Creating a Custom Case Field "To" Email Address
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-08-2008 05:02 PM
Re: Creating a Custom Case Field "To" Email Address
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-09-2008 02:22 PM
I'm not sure I follow what you're trying to do. Included among the standard fields of the Case object are "Account Name" and "Contact Name". Wouldn't these fields suffice to identify which accounts a support case is being opened under?
If you use these fields, then you can also set it up so that when a User is looking at a Account or Contact detail record, they will see all the related Cases that have been opened for that entity.
Force Monkey
Re: Creating a Custom Case Field "To" Email Address
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-09-2008 03:06 PM
Re: Creating a Custom Case Field "To" Email Address
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-09-2008 03:20 PM
Force Monkey
Re: Creating a Custom Case Field "To" Email Address
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-09-2008 03:39 PM
It is precisely the same, we have a web support form that pre-populates most case information (though not account because until this time we had only had one).
For phone, our reps choose this info.
For email, we have multiple emails boxes from which emails are pulled into salesforce as cases. Currently the Account is automatically populated with what had been our default in the past. I am looking for a way to have the account populate based on the email box that the case is pulled from.
Re: Creating a Custom Case Field "To" Email Address
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-09-2008 03:42 PM
Re: Creating a Custom Case Field "To" Email Address
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-09-2008 04:10 PM
// new Case object to be created
Case[] newCase = new Case[0];
// Try to lookup any contacts based on the email from address
// If there is more than 1 contact with the same email address
// an exception will be thrown and the catch statement will be called
try {
for (Contact vCon_tmp : [Select Id, Name, Email From Contact Where Email = :email.fromAddress Limit 1]) {
foundContact = TRUE;
vCon = vCon_tmp;
}
}
:
:
:
if (foundContact) {
newCase.add(new Case(Description = myPlainText,
Status = 'New',
Priority = '4-Normal',
Origin = 'Email',
Subject = email.subject,
OwnerId = tseQueue.Id,
ContactId = vCon.Id));
} else {
newCase.add(new Case(Description = myPlainText,
Status = 'New',
Priority = '4-Normal',
Origin = 'Email',
OwnerId = tseQueue.Id,
Subject = email.subject));
}// Try to lookup any contacts based on the email from address
// If there is more than 1 contact with the same email address
// an exception will be thrown and the catch statement will be called
try {
for (Account vAcnt_tmp : [Select Id, Name From Account Where email2case_alias__c = :email.toAddress Limit 1]) {
foundAccount = TRUE;
vAcnt = vAcnt_tmp;
}
}How's that for being clear as mud?
Force Monkey
Re: Creating a Custom Case Field "To" Email Address
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-09-2008 04:47 PM
Code: sfdcconfig.txt <configFile> <sfdcLogin> <url>http://www.salesforce.com/services/Soap/u/6.0</url> <userName>username@mycompany.com</userName> <password>xxxxxx</password> <loginRefresh>30</loginRefresh> <timeout>4</timeout> </sfdcLogin> <notify> <notifyEmail>McCain@mycompany.com</notifyEmail> <from>McCain@mycompany.com</from> <host>host.server.com</host> <!--port>25</port--> <user>McCain</user> <password>xxxxx</password> <service>com.sforce.mail.SMTPNotification</service > </notify> <services> <com.sforce.mail.EmailService>C:\\McCainEmailAgent 60\\email2case.txt</com.sforce.mail.EmailService> </services> </configFile>
The above doesn't really mean much to me, this was set up by a third party a few years ago and we have been winging it since. I was able to copy the rule above (and the email to case file) and make the necessary changes to add new email addresses whose emails are pulled into salesforce.
Re: Creating a Custom Case Field "To" Email Address
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-09-2008 04:59 PM - last edited on 09-09-2008 05:01 PM
Message Edited by JPSeabury on 09-09-2008 05:01 PM
Force Monkey
Re: Creating a Custom Case Field "To" Email Address
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-09-2008 05:07 PM

