You need to sign in to do that
Don't have an account?
Janardhana Reddy
when workflow fires getting blank email. can any one help me how to fix the problem
public class Contactemail {
public Contact Contact;
public ID contactId{get;set;}
public List<Account> accountList;
public Contactemail(){
}
public Contact getContact() {
if (this.Contact == null && this.contactId != null) {
this.Contact = [Select Id,Name,FirstName,VolunteerPage1URL__c,Owner.Name,Owner.Title,Owner.Email,Owner.Phone from contact where id = :this.contactId];
}
return this.Contact;
}
public List<Account> getAccountList() {
List<contact> zipList = [select mailingpostalcode
From Contact
where Id =: ContactId
Limit 1];
system.debug('zipList ==>'+zipList);
Set<String>zipId = new Set<String>();
for(Contact zip:zipList){
zipId.add(zip.mailingpostalcode);
}
List<Zip_Code__c> councilList = [select id,Council__c
from Zip_Code__c
where Name =:zipId
Limit 1];
Set<Id>councilId = new Set<Id>();
for(Zip_Code__c zip:councilList){
councilId.add(zip.Council__c);
}
system.debug('councilList ==>'+councilList);
accountList = new List<Account>();
this.accountList = [
Select Id
, Council_Header__c
, Council_Header_Url__c
, Council_Email__c
, Phone
, Name
From Account
where Id = :councilId
limit 1
];
return this.accountList;
}
}
public Contact Contact;
public ID contactId{get;set;}
public List<Account> accountList;
public Contactemail(){
}
public Contact getContact() {
if (this.Contact == null && this.contactId != null) {
this.Contact = [Select Id,Name,FirstName,VolunteerPage1URL__c,Owner.Name,Owner.Title,Owner.Email,Owner.Phone from contact where id = :this.contactId];
}
return this.Contact;
}
public List<Account> getAccountList() {
List<contact> zipList = [select mailingpostalcode
From Contact
where Id =: ContactId
Limit 1];
system.debug('zipList ==>'+zipList);
Set<String>zipId = new Set<String>();
for(Contact zip:zipList){
zipId.add(zip.mailingpostalcode);
}
List<Zip_Code__c> councilList = [select id,Council__c
from Zip_Code__c
where Name =:zipId
Limit 1];
Set<Id>councilId = new Set<Id>();
for(Zip_Code__c zip:councilList){
councilId.add(zip.Council__c);
}
system.debug('councilList ==>'+councilList);
accountList = new List<Account>();
this.accountList = [
Select Id
, Council_Header__c
, Council_Header_Url__c
, Council_Email__c
, Phone
, Name
From Account
where Id = :councilId
limit 1
];
return this.accountList;
}
}
Ankit Arora
What happens when workflow fire? And how this class is in role?
Janardhana Reddy
When Workflow triggers email sent to the Contact email id, that email not having any body
Ankit Arora
Email is sent via email alert or trigger?
Janardhana Reddy
Via Workflow email alert