Friday, March 16, 2018

Salesforce Lightning - inter namespace component communication



There is a challenge to integrate lightning components from different managed packages. There raised a question "Are the communication between the components from different namespace is possible ? "

As per my understanding, I confirmed yes;  but others are not satisfied on that. So we have raised a case for Salesforce support and  described our problem to them. They confirmed that inter namespace communication is not possible in locker service.

Since I have still doubted on that, I done a POC with different namespaces.

I have created a parent component with two attributes in one org (namespace1) and created a child component in another org (namespace2). I have integrated both of them with Javascript.  The two packages are created from both of the orgs and installed in a 3rd org.

In the 3rd org, I can success fully run the application by passing attribute values from parent component (namespace1) to child component (namespace2) also using the events I passed the data back from child to parent componet.


So I can confirm, the communication between lightning components which are in different namespace is possible, rather than the Salesforce support.

Its my experience !!!





No comments:

Post a Comment