I have this VF page:
<apex:page standardController="Quote" standardstylesheets="false" sidebar="false" applyBodyTag="false" extensions="QuoteExt" renderAs="PDF">
<apex:repeat value="{!Quote.Quotelineitems}" var="qli" id="qli" rendered="false">
<apex:outputtext value="{!qli.Product2.name}" />
<apex:outputtext value="{!qli.Product2.Included_features__c}" />
<apex:outputtext value="{!qli.Product2.Limits__c}" />
<apex:outputtext value="{!qli.Product2.Type__c}" />
<apex:outputtext value="{!qli.Quantity}" />
</apex:repeat>
[...]
And this controller:
public class QuoteExt {
private final Quote quote;
public QuoteExt(ApexPages.StandardController stdController) {
this.quote = (Quote)stdController.getRecord();
}
public Map<String, Boolean> getCombinedPlanIncludedFeatures() {
Map<String, Boolean> included_features = new Map<String, Boolean>();
for(QuoteLineItem l: quote.QuoteLineItems) {
if (l.Product2.Type__c=='Subscription' || l.Product2.Type__c=='Add-on') {
---> System.debug(l.Product2.Included_features__c);
}
}
return included_features;
}
[...]
The marked line fails with: System.SObjectException: SObject row was retrieved via SOQL without querying the requested field: Product2.Included_features__c
I have no idea why. The field is a multi picklist type if that helps.
Thanks in advance!
Regards, Jacob