I went through an example showing contact list search etc. In the SearchBarController.JS we have this line:

var myEvent = $A.get("e.**namespace**:SearchKeyChange");

And this works fine where implemented. Dropping the namespace causes an error.

1. Is it a must to have the namespace when doing Get for an event?

When I try to pack it as un-managed and use it in another org this failed. In debug its null.

2. Do I need to change manually all references from one namespace to another?

I tried to pack it as managed and got this error:

(xxx) Validation Errors While Saving Record(s) There were custom validation error(s) encountered while saving the affected record(s). The first validation error encountered was "{0}".

3. Any idea what can be done?

4. Did anyone try installing managed lightning component/app that has namespace reference?

PS. Saw this: Deploy Lightning components without namespace

Many thanks.

  1. Absolutely

    • e.searchkeychange would be a component event, but since $A.get() is global it doesn't have a context of a component to resolve against, so you must specify the namespace for the event you are trying to access.
  2. Yes. Can't map one to another.

  3. :( Not sure, that's annoying.

  4. Sounds like you're good here.

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.