function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
DNA by the BayDNA by the Bay 

Checkbox Formula Output Not Displaying Correctly in VisualForce Template

Hi all, I'm trying to include the value from a checkbox in a VF email template, and I'm having no luck. My org has a large list of Products, and some of those Products are discountable, and some aren't. I have a custom field on the Product object to capture this (Discountable__c). I've also created an Opportunity Product field also called Discountable__c that has the following formula:

 

IF(PricebookEntry.Product2.Discountable__c,"True","False")


I want to display this value (True or False) in a VF email template, but nothing is displaying. Here's what I have in the VF template (it's in a table with other product information):

 

<td>{!opp.Discountable__c}</td>

 

where "!opp" equals Opportunity.OpportunityLineItems (this !opp variable works with other fields so that isn't the issue).

 

What am I doing wrong? Thanks!

RakeshistomRakeshistom

Can you please tell me which object contain you check box?

Product ?

 

If yes

 

What is the relation ship with Opportunity ?

 

if anyy opp.product.checkbox name

DNA by the BayDNA by the Bay

Product does contain the checkbox, yes.

 

The relationship with Opportunity is that it is a Product that has been added to that Opportunity, so it's an Opportunity Line Item.