You need to sign in to do that
Don't have an account?
Prad Nethas
Visual Force Email template error.
Hi All,
I have a Visual force email template on a workflow action. That will fire upon creation of Account and when it meets a check box to true and not a specific profile user. To test it I also have added the task, which creates parallalely.
Problem I am facing is when I have added the component to the Vf email template then My Vf Template is giving me an error
Below is the error
Error occurred trying to load the template for preview: List has no rows for assignment to SObject. Please try editing your markup to correct the problem.
What could be the possible issue can you please help me out on this.
Below is my class for the vf component which gets account id.
public class CTBnewmyresourceemail {
List<asset> assetlist = new List<asset>();
Account accdetails = new Account();
public id recId;
public Account thisAccountId { get; set; }
public CTBnewmyresourceemail()
{
recId = ApexPages.currentPage().getParameters().get('Id');
accdetails = [select id from account where id=:recId limit 1];
assetlist = [select id,accountid,description from asset where accountid =:accdetails.id];
//return assetlist;
}
public List<asset> getAccount_assets() {
return assetlist;
}
}
Did I made any mistake in it please suggest me.
Also In the visual force page I am trying to display the asset field value of that particular account.
THanks in advance
Prad
I have a Visual force email template on a workflow action. That will fire upon creation of Account and when it meets a check box to true and not a specific profile user. To test it I also have added the task, which creates parallalely.
Problem I am facing is when I have added the component to the Vf email template then My Vf Template is giving me an error
Below is the error
Error occurred trying to load the template for preview: List has no rows for assignment to SObject. Please try editing your markup to correct the problem.
What could be the possible issue can you please help me out on this.
Below is my class for the vf component which gets account id.
public class CTBnewmyresourceemail {
List<asset> assetlist = new List<asset>();
Account accdetails = new Account();
public id recId;
public Account thisAccountId { get; set; }
public CTBnewmyresourceemail()
{
recId = ApexPages.currentPage().getParameters().get('Id');
accdetails = [select id from account where id=:recId limit 1];
assetlist = [select id,accountid,description from asset where accountid =:accdetails.id];
//return assetlist;
}
public List<asset> getAccount_assets() {
return assetlist;
}
}
Did I made any mistake in it please suggest me.
Also In the visual force page I am trying to display the asset field value of that particular account.
THanks in advance
Prad
Please pass id as url parameter with any value of accounnt id. Based on this id account are retrivingg and its associateed assets are.
Thanks,
Debasis
All Answers
Please pass id as url parameter with any value of accounnt id. Based on this id account are retrivingg and its associateed assets are.
Thanks,
Debasis
Thanks
Error occurred trying to load the template for preview: java.lang.reflect.InvocationTargetException. Please try editing your markup to correct the problem.
Thank you
How can pass id for a work flow email template
is it wrong way to for gettin id
Please let me know
Regards
Prad
You may need to have different approch
Thanks