You need to sign in to do that
Don't have an account?
SFDC Dummy
Mail Message with Subject Line
Hi All
I have created a apex class for sending mail.but my requirment is subject line is different for diffrenet object.
mainly i have created this for task object for assining task ,when user assign any task depending on custom object/standard object it will send a mail with proper subject line
for ex
if(acc.Company_Name__c !=null)
{
mail.setSubject( + acc.Company_Name__c );
}
else
mail.setSubject( 'There is no company name' );
i has create like this but its not working.
I have created a apex class for sending mail.but my requirment is subject line is different for diffrenet object.
mainly i have created this for task object for assining task ,when user assign any task depending on custom object/standard object it will send a mail with proper subject line
for ex
if(acc.Company_Name__c !=null)
{
mail.setSubject( + acc.Company_Name__c );
}
else
mail.setSubject( 'There is no company name' );
i has create like this but its not working.
see this : http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_sobject.htm#apex_System_SObject_get
Now I think there will be different fields for different objects you could configure them using Custom Settings
https://help.salesforce.com/apex/HTViewHelpDoc?id=cs_about.htm