0

I went thru multiple topics in here and not a single one mentioned solution I'm trying to do. But I'm getting error.

Target solution: Have a list view button that would redirect user on Lightning Component with list of Ids that user selected on list view.

Note: As I would like to avoid using VF Page and Lightning Out I was trying to use component that implements lightning:isUrlAddressable interface and URL button to target that component based on his URL.

Issue: I'm getting Javascript error (var auraConfig = ;) (not my code. My component does have init which is empty now)

(ERROR) Uncaught SyntaxError: Unexpected token ';'

(SOURCE)
var time = window.performance && window.performance.now ? window.performance.now.bind(performance) : function(){return Date.now();};
window.Aura.bootstrap.execInlineJs = time();

window.Aura.inlineJsLoaded = true;

var auraConfig = ;
auraConfig.context.styleContext = null;

This is dump from source of one.app. I believe this error is due to Aura Framework was not loaded properly.

Question: Is there something I can do? Or it's just not supported and Lightning is not loaded properly in this case and I have to use VF Page with Lightning Out to achieve my goal?

Thank you.

EDIT_1: I'm considering creation of Idea for salesforce to create Lightning URL List View button usable for isUrlAddressable components. It would really make sense to have it as using VF page in iFrame to display custom Lightning component in custom Lightning application is just rubbish.

EDIT_2: SF has in roadmap support for Lightning Quick Actions for List Views and Related Lists. Meanwhile you can use this solution: 1. List View Button to VF Page that will get selected IDs 2. Controller of that page will store those IDs in platform cache 3. Page will have hidden link and JS that will redirect to your UrlAddressable component 4. Component will call on init Apex endpoint which will get that IDs stored in platform cache. 5. Tada! You have successfully targeted Lightning (A/W) Component from List View that contains List of selected IDs, so you can leverage full capacity of Lightning Framework.

0

The error stems from the line

var auraConfig = ;

You should either assign something here or remove the equals sign and just have a declaration.

  • I know, but that's not my code. My component doesn't even have code yet. it has init but entire content is commented out. – jakub Nov 8 at 12:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.