You need to sign in to do that
Don't have an account?
jpgilbert
Discrepancy between Visualforce Communication Template output and field decimal value
Hi,
I have a custom object called Style__c which has a Lookup field to Product2 table called.
When I run a SOQL command inside the controller of my Visualforce template, ReturnFormStyleInfo, the name value doesn't report.
When I choose the template which refers to the controller, the data populates the email template but you can see it is missing the Product Name:
Running a SOQL query directly, you can see that the name should be available for output via the component.
Here is the getStyleInfo method from the class ReturnFormStyleInfo
Which is referenced in this component.
I have a custom object called Style__c which has a Lookup field to Product2 table called.
When I run a SOQL command inside the controller of my Visualforce template, ReturnFormStyleInfo, the name value doesn't report.
When I choose the template which refers to the controller, the data populates the email template but you can see it is missing the Product Name:
Running a SOQL query directly, you can see that the name should be available for output via the component.
Here is the getStyleInfo method from the class ReturnFormStyleInfo
public string getStyleInfo()
{
string ret = '\nStyle\t\tPrice\tQty\n';
for(Style__c s : [SELECT Style__r.Name, Price__c,Quantity__c FROM Style__c WHERE Case__r.CaseNumber=:thecase])
{
ret += s.Style__r.Name + '\t$' + s.Price__c + '\t' + s.Quantity__c + '\n';
}
return ret;
}
{
string ret = '\nStyle\t\tPrice\tQty\n';
for(Style__c s : [SELECT Style__r.Name, Price__c,Quantity__c FROM Style__c WHERE Case__r.CaseNumber=:thecase])
{
ret += s.Style__r.Name + '\t$' + s.Price__c + '\t' + s.Quantity__c + '\n';
}
return ret;
}
Which is referenced in this component.
<apex:component access="global" controller="ReturnFormStyleInfo">
<apex:attribute name="casenum" description="This is the CaseNumber of the case." type="string" assignTo="{!thecase}" />
{!StyleInfo}
</apex:component>
<apex:attribute name="casenum" description="This is the CaseNumber of the case." type="string" assignTo="{!thecase}" />
{!StyleInfo}
</apex:component>
Gigi.Ochoa
Have you checked profiles to make sure you can view Product object and the fields?