I have button on the lightning component, on it's click action it is naviagating to another lightning component.

Resultant URL is https://cmp-adecco--devv27.lightning.force.com/lightning/cmp/c__LC25_AMSAgreementManagement?recordId=somerecordId

This is my code:-

var navService = component.find("navService"); var pageReference = { type: 'standard__component', attributes: { componentName: 'c__LC25_AMSAgreementManagement', }, state: { "recordId" : recId } } component.set("v.pageReference", pageReference); event.preventDefault(); navService.navigate(pageReference);

Same thing works in another sandbox perfectly.

What can be the issue?

  • 1
    are you sure component name is "c__LC25_AMSAgreementManagement"?? – Sagar Hinsu Apr 5 '19 at 8:40
  • Component name is LC25_AMSAgreementManagement, c__ is the namespace. – mvk1991 Apr 5 '19 at 9:33
  • did you find a solution to this? – Kaushik Ray Jun 17 '19 at 11:02
  • yes.. in the latest release, it is mandatory to add namespace before the query parameters. so if you don't have any namespace just add c__ to the parameter name.. i.e. in my code recordId will be renamed as c__recordId – mvk1991 Jun 17 '19 at 15:12

I'm getting this error when profile doesn't have access to an object type specified as aura attribute, for example:

<aura:attribute name="someObjects" type="Some_Object__c[]"/>

You can either set type as generic Object[] (setting these types are pretty much pointless anyway) or adding Read permission on Some_Object__c for the profile that's accessing the page.

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.