You need to sign in to do that
Don't have an account?
AmitZA
Use startWithIgnoreCase to recognize an email
I am looking to write a class on the Task object to categorize emails coming in or going out of the system when they are forwarded into the system by Email-To-Salesforce BCC address but they are synced the same except:
Additional To: xxxx@xxxx.com
CC:
BCC:
Attachment:
should be categorized as an Outgoing Email
while
Additional To:
CC:
BCC:
Attachment:
should be categorize as an Incoming Email.
How should the I write the IF statement?
Thanks!
Additional To: xxxx@xxxx.com
CC:
BCC:
Attachment:
should be categorized as an Outgoing Email
while
Additional To:
CC:
BCC:
Attachment:
should be categorize as an Incoming Email.
How should the I write the IF statement?
Thanks!
for Incoming Email you don't report any rule. I think that you must identify a rule to understand the difference between the two cases.
When you have the rule it will be easy to do an if-else statement to write your test class.
Without anymore info it is difficult to help you
Claudio
All Answers
for Incoming Email you don't report any rule. I think that you must identify a rule to understand the difference between the two cases.
When you have the rule it will be easy to do an if-else statement to write your test class.
Without anymore info it is difficult to help you
Claudio
Thanks for your time on answering my question.
I am looking to take the Task's Description field (textarea 32000)
Additional To:
CC:
BCC:
Attachment:
Cut only the first line:
Additional To:
and then my IF statement will be if that first line is over 16 chars, then it is of type Outgoing Email, if it is 16 or less then it is incoming.
I have created something which works:
It is a fragile logic but until this will have to make do for now.
If you have any recomendations for editing, I would appreciate your insights.
Grazie Mille,
Amit
yes this is a fragile logic, but actually I don't see another way to test this think.
Don't you have any others attributes on your email (maybe a value in object that you can looking for)?
Prego
Claudio
Thanks again for your feedback.
Cordiali Saluti,
Amit