+ Start a Discussion
TMangoTMango 

Pass YearStarted and DunsNumber through Visualforce Template

I am trying to build a Visualforce template, which will populate our Clicktools survey through the URL parameters.  Our org has Data.com Clean and the DUNs Number (DunsNumber) and Year Started (YearStarted) are available in our Account records; however, I am not able to call them in the Visualforce template.  The code works for all other fields, but for these two fields I get the dreaded "Invalid field {insert field name here} for sObject Account" error. 

            <apex:param name="q7" value="{!relatedTo.YearStarted}" />
            <apex:param name="q13" value="{!relatedTo.DunsNumber}" />

Does anyone know if there is a way to capture this information? 
Andy BoettcherAndy Boettcher
If you're having issues getting those fields to render - you could make a Formula field that references them in the Account object, then just reference those formula fields from the template?
TMangoTMango
Thanks, Andy ... I definitely get that as a workaround.  Just wondering if there's a way to do it without utilizing another custom field on the Account record ....