Reputation: 1
I wrote this code as JS controller of a component to invoke a VF Page but here it is showing that This error
This page has an error. You might just need to refresh it. Action failed: c:DataProcessor$controller$downloadDocument [sendDataProc is not a function] Failing descriptor: {c:DataProcessor$controller$downloadDocument}
({
downloadDocument : function(component, event, helper){
console.log("line 3");
var sendDataProc = component.get("v.sendData");
console.log(sendDataProc);
var dataToSend = {
"label" : "This is test"
}; //this is data you want to send for PDF generation
console.log(dataToSend);
//invoke vf page js method
sendDataProc(dataToSend, function(){
console.log('hello');
});
},
})
Upvotes: 0
Views: 45