3

There are 2 questions in this :

  1. I have deployed my code from dev Org to packaging org using workbench. For my code to work in packaging org, should my packaging org have domain name registered? I think it should because we need to include lightning out library in markup to enable us to use ltng:out as mentioned here

Adding the Lightning Out Library to the Page Enable an origin server for use with Lightning Out by including the Lightning Out JavaScript library in the app or page hosting your Lightning components app. Including the library requires a single line of markup.

<script src="https://***myDomain***.my.salesforce.com/lightning/lightning.out.js"></script>

I am a bit unsure about this. Please correct me if I am wrong.

2.If the answer to above is yes, then when this all is packaged in managed package and sent to some prod/sandbox org, for it to work there, it will require that org to be a.)domain name registered and b)Domain of that org has to be coded in above line. Does salesforce handle this automatically?

I know these are basic questions, appreciate your patience and pardon any silly asks.

1 Answer 1

2

Nothing "silly" about your questions - this stuff is complex and still very new to everyone.

  1. When the container is Visualforce (Lightning Components for Visualforce uses LO but adds a few things) we've tried to reduce some of the effort by providing the new Visualforce component apex:includeLightning that will handle the details of generating the correct URL for lightning.out.js for you.
  2. There should be nothing you have to do on your end. Either managed (namespaced) or unmanaged packages work with Lightning Out and the My Domain requirements are not on your code/package but on the target org (My Domain is required for security reasons for any org to run custom components regardless of the author).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .