We are trying to show an iframe from Business Central (onprem) inside our D365 for Sales (cloud).
Per default BC does not allow to be used from different servers than the BC server. Unless we specify an AllowedFrameAncestors key in the web servers navsettings.json file.
So I used this Powershell command:
Set-NAVWebServerInstanceConfiguration -KeyName “AllowedFrameAncestors” -WebServerInstance $serverInstance -KeyValue "https:*.crm4.dynamics.com"
But when using it then we the following error in the server event log:
Type: Microsoft.Dynamics.Nav.Types.NavConfigurationException
SuppressMessage: False
ContainsPersonalOrRestrictedInformation: False
DiagnosticsSuppress: False
MessageWithoutPrivateInformation: The configuration setting ‘AllowedFrameAncestors’ is not valid for Microsoft Dynamics 365 Business Central Server.
SuppressExceptionCreatedEvent: False
FatalityScope: None
Message: The configuration setting ‘AllowedFrameAncestors’ is not valid for Microsoft Dynamics 365 Business Central Server.
StackTrace:
at Microsoft.Dynamics.Nav.Types.ServerSettingsBase1.GetSettingDefinition(String settingName)* *at Microsoft.Dynamics.Nav.Management.Cmdlets.GetNavServerConfiguration.InternalValidate()* *at Microsoft.Dynamics.Nav.Management.NavCommand.ProcessRecord()* *Source: Microsoft.Dynamics.Nav.Types* *HResult: -2146233088* *StackTrace:* *at Microsoft.Dynamics.Nav.Types.ServerSettingsBase
1.GetSettingDefinition(String settingName)
at Microsoft.Dynamics.Nav.Management.Cmdlets.GetNavServerConfiguration.InternalValidate()
at Microsoft.Dynamics.Nav.Management.NavCommand.ProcessRecord()
BC 13.3.27233 - on-premise
If this error message is correct, then there is something wrong in the documentation.