You need to sign in to do that
Don't have an account?
Tim Chadwick 11
lightning:openFiles
I all, Currently working on something to open a image of a file, However following the support documents the function does not seem to work, (e.lightning:openFiles). There seems to be very little documentation on this area. This is my code, (CMP)
(CMPController)
The console logs as follow:
enter
failed hard
exit
So it looks like the action variable does get initalised by the openFiles function. Can anyone help here?
<aura:dependency resource="markup://lightning:openFiles" type="EVENT"/> <lightning:button variant="brand" label="Preview Reciept" onclick="{!c.preview}" />
(CMPController)
console.log('enter'); var action = $A.get('e.lightning:openFiles'); if(action){ action.setParams({ "recordIds" :['0690Y000001GnHVQA0','0690Y000001GfdFQAS'], "selectedRecordId" : "0690Y000001GnHVQA0" }); action.fire(); }else { console.log('failed hard'); } console.log('exit');
The console logs as follow:
enter
failed hard
exit
So it looks like the action variable does get initalised by the openFiles function. Can anyone help here?
Does fire when loaded from lightning Tab