You need to sign in to do that
Don't have an account?
Katie DeLuna 12
Visualforce templates
I am attempting to update a visualforce email template based on conditional formatting. I only want the field "Training Room" to be in the email template if there is data in the Training_Room__c field. If it is null, then I do not want the training room data pulled in anywhere.
Right now, it's always pulling Training_Room__c. See below:
<apex:outputPanel rendered="{!relatedTo.Training__r.Training_Type__r.Virtual_Training_Type__c = false}">
<b>Time:</b> {!relatedTo.Training__r.Training_Type__r.Time__c}<br/>
</apex:outputPanel>
<apex:outputPanel rendered="{!relatedTo.Training__r.Training_Type__r.Virtual_Training_Type__c = true}">
<b>Time:</b> {!relatedTo.Training__r.Virtual_Start_and_End_Time__c}<br/>
</apex:outputPanel>
<b>Training Room:</b> {!relatedTo.Training__r.Training_Room__c}<br/>
Right now, it's always pulling Training_Room__c. See below:
<apex:outputPanel rendered="{!relatedTo.Training__r.Training_Type__r.Virtual_Training_Type__c = false}">
<b>Time:</b> {!relatedTo.Training__r.Training_Type__r.Time__c}<br/>
</apex:outputPanel>
<apex:outputPanel rendered="{!relatedTo.Training__r.Training_Type__r.Virtual_Training_Type__c = true}">
<b>Time:</b> {!relatedTo.Training__r.Virtual_Start_and_End_Time__c}<br/>
</apex:outputPanel>
<b>Training Room:</b> {!relatedTo.Training__r.Training_Room__c}<br/>
You rendered based on the picklist. If the Training_Room__c is not null. Use the above one in apex:page or pageblock.
Please let me know if you have any issues. If it helps please select as Solved and best answer.