Understand what is set up in your Local Business Data environment - Get-D365LBDConfig
Using the Get-D365LBDConfig function will help you automate your Dynamics 365 environments and not need to hardcode environment details in your pre or post deployment scripts.