You need to sign in to do that
Don't have an account?
Miller 95
Predefining IDs within VisualForce
Hi,
I am creating a Visualforce email template and having a hard time using IDs within the code. My relatedto object is PricebookEntry, as shown:
relatedToType="PricebookEntry"
Within the code I utilize the command {!relatedto.unitprice}. Once I send the email, it then ask me for the PricebookEntryID. I would like to have that ID predefined within the code so users do not have to have that ID on hand. So the code would related to/look something like:
{!relatedto.01uC000000ARO67IAH.unitprice} - I realize this is wrong, but providing an example of what I am explaining.
Any suggestions of how to predefine IDs within Visualforce so users only have to deal with selecting recipients?
I am creating a Visualforce email template and having a hard time using IDs within the code. My relatedto object is PricebookEntry, as shown:
relatedToType="PricebookEntry"
Within the code I utilize the command {!relatedto.unitprice}. Once I send the email, it then ask me for the PricebookEntryID. I would like to have that ID predefined within the code so users do not have to have that ID on hand. So the code would related to/look something like:
{!relatedto.01uC000000ARO67IAH.unitprice} - I realize this is wrong, but providing an example of what I am explaining.
Any suggestions of how to predefine IDs within Visualforce so users only have to deal with selecting recipients?
Then in your vf code you can do soemthing like this
In short, use a map set in your controller for this.
Also, why are you hard coding ids? thats a code smell.