In this version of Dynamics 365 there is a bug when you click on the lookup icon on a connection form. The error that occurs is:
Where the field changes depending on the lookup you press. This is a bug in Dynamics 365 and is due to four functions missing in the Connection_main_system_library.js.
On the connection form create a new onload JavaScript event that sets the following functions.
Then on the onload event you just call the onLoad function above.