2

I'm getting multiple system error dialog when trying to execute System Events in Lightning Components (in Console Navigation app).

I've tried a link action and action button, and both return errors. My code is as follows:

Error in using force:navigateToSObject :

On a Link onclick, I'm opening the record's detail view by using force:navigateToSObject event as follows:

var navEvt = $A.get("e.force:navigateToSObject");
navEvt.setParams({
  "recordId": recordId
});
navEvt.fire();

And it throw following 2 error dialog, dialog 1 appear first, and then dialog 2 show up after clicking OK on dialog 1:

Error dialog 1:

Uncaught Error in $A.getCallback() [Cannot read property 'setParams' of undefined] throws at https://pk1-dev-ed.lightning.force.com/auraFW/javascript/h_soHR8Rt2_c3cVcuaSlUA/aura_proddebug.js:18473:9 Object.fireEvent()@https://pk1-dev-ed.lightning.force.com/components/force/navEventManager.js:159:16 Object.fireTranslatedEvent()@https://pk1-dev-ed.lightning.force.com/components/force/navEventManager.js:146:22 Object.fireTranslatedStateEvent()@https://pk1-dev-ed.lightning.force.com/components/force/navEventManager.js:177:18 Object.force:navigateToSObject()@https://pk1-dev-ed.lightning.force.com/components/force/navEventManager.js:214:18 Object.handleSimpleTranslation()@https://pk1-dev-ed.lightning.force.com/components/force/navEventManager.js:135:20

Error dialog 2:

Access Check Failed! EventService.getEventDef():'markup://force:navigateToState' is not visible to 'markup://pk1:ListContactRecord {3:1967;a}'. Object.fireEvent()@https://pk1-dev-ed.lightning.force.com/components/force/navEventManager.js:157:22 Object.fireTranslatedEvent()@https://pk1-dev-ed.lightning.force.com/components/force/navEventManager.js:146:22 Object.fireTranslatedStateEvent()@https://pk1-dev-ed.lightning.force.com/components/force/navEventManager.js:177:18 Object.force:navigateToSObject()@https://pk1-dev-ed.lightning.force.com/components/force/navEventManager.js:214:18 Object.handleSimpleTranslation()@https://pk1-dev-ed.lightning.force.com/components/force/navEventManager.js:135:20


Error in using force:editRecord :

On a Link onclick, I'm opening edit dialog for the record by using force:editRecord event as follows:

var editRecordEvent = $A.get("e.force:editRecord");
editRecordEvent.setParams({
    "recordId": recordId
});
editRecordEvent.fire();

This results in single error dialog, but it still opens up the Edit Modal dialog as well. Edit Record modal appears behind the System Error modal dialog with following error details:

Access Check Failed! AttributeSet.get(): attribute 'editOverriddenKeyPrefixes' of component 'markup://one:consoleLayoutContainer {1:0;p}' is not visible to 'markup://one:consoleLayoutContainer {1:0;p}'. Object.hasEditOverride()@https://pk1-dev-ed.lightning.force.com/libraries/one/centerStageLibrary/Record.js:154:29 Object.handler_force_editRecord()@https://pk1-dev-ed.lightning.force.com/libraries/one/centerStageLibrary/Record.js:105:28 eval()@https://pk1-dev-ed.lightning.force.com/components/one/consoleLayoutContainer.js:1921:29 Object.handleCenterStageEvent()@https://pk1-dev-ed.lightning.force.com/components/one/consoleLayoutContainer.js:1907:17 handleCenterStageEvent()@https://pk1-dev-ed.lightning.force.com/components/one/consoleLayoutContainer.js:194:16


I'm running clueless as both these Edit and Record View actions work fine in Lightning Component, when the Lightning App is using Standard Navigation, and breaks with errors in Lightning App with Console Navigation in it.

Is there any other way available for accessing record view or edit? I've already tried following:

  1. Setting a direct URL = #/sObject/<recordId>/view
  2. Setting a direct URL = #/sObject/<recordId>/edit

Though, [1] URL works fine and opens record, but [2] still throws same error which happens on force:editRecord event navigation. Plus, I don't think setting direct URL formatting is ideal way to code, it seems more hackishh kind of way to me. Though I surely need some help if someone has ideas on this.

EDIT: Locker Service Activate/Deactivate has no effect on this error. It remains the same on both occasions.

  • This conversation is turning into an extended discussion, so I have moved it to chat to reduce noise on this post. Please continue to discuss there as necessary. – Adrian Larson Feb 14 '17 at 20:23
  • @AdrianLarson - for some reason I'm unable to load the chat thread the discussion is moved to. Can you confirm if this issue has been confirmed as internal bug to be fixed or if it is trackable via a Known Issue link? – VarunC Mar 6 '17 at 12:03
  • I know little about the issue at hand. You should be able to view the chat...you certainly have enough rep to do so. – Adrian Larson Mar 6 '17 at 17:16
  • Yes, that is why it is strange - I'm getting following error page on opening the chat link posted in above comments - error screenshot – VarunC Mar 6 '17 at 17:27

Your Answer

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

Browse other questions tagged or ask your own question.