I want to use Visualforce remote object to retrieve data and display it as PDF.
I use this code.
<apex:remoteObjects jsNamespace="RemoteObjectModel">
<apex:remoteObjectModel name="Opportunity"
fields="Id,Name,StageName" jsShorthand="opp">
<apex:remoteObjectField name="Sent__c" jsShorthand="sent"/>
</apex:remoteObjectModel>
</apex:remoteObjects>
<script>
function retrieveOpp(){
var record = new RemoteObjectModel.opp();
record.retrieve({limit:1}, function(err, records, event){
console.log(err,records,event);
});
}
window.onload = retrieveOpp();
</script>
When VF page is set to renderAs="PDF"
then console display nothing. When I remove the renderAs
tag then console displays the retrieved result.
Is this standard behavior and documented?