Microsoft Dynamics 365 Portals v8.2 introduced a new way to implement multilanguage portals. I outlined how to enable multi-language on portals here.
Essentially, there is now a “parent” web page record as well as a “child” page for the default language and additional content language pages can be added.

What can be confusing is if you want to add some JavaScript code to the web page and where it should go.
If you navigate to the “parent” web page record, and scroll down and click “Advanced” there will be a section to add JavaScript.
However, this code will not actually run on your web page, which could cause some confusion and delay when trying to add and edit JavaScript on your web page. Mainly because in Portals 8.1 and Legacy Adxstudio, that is where the code would go.

You will actually need to navigate to *each* content page to add the JavaScript. This is not necessarily ideal in terms of code management, but the plus side is that some of messaging from the JavaScript might have to be in a seperate language anyway.
The code in the content page will run.
If we navigate to the web page on the portal, we will see the appropriate result (and based on the alert message, know that its the code on the child page that gets run).
There are other ways to ensure that your code gets added to the correct spot. You are able to add JavaScript code via the the front side editor.
The new update to the XrmToolBox will make it easier to manage this code. The latest build identifies the particular content pages. (Along with colour coding!)
Hopefully this information will help as you add JavaScript to your Portal projects!
Cheers
Nick
Nick Doelman is a Microsoft Business Solution MVP and wants to let his blog readers that it is currently the NHL playoffs and that Canada is pretty much shut down until the Stanley Cup is awarded. Go Sens!