简体   繁体   English

如何使用 Import-NAVApplicationObject 命令使用导出的 *.fob 更新 NAV2018

[英]How to update NAV2018 with exported *.fob using command Import-NAVApplicationObject

I tried update NAV2018 using *.txt files first.我首先尝试使用*.txt文件更新 NAV2018。 But it requires some packages as for development.但它需要一些软件包作为开发。 So i tried update NAV2018 with exported *.fob :所以我尝试使用导出的*.fob

Import-Module "${env:ProgramFiles(x86)}\Microsoft Dynamics NAV\110\RoleTailored Client\NavModelTools.ps1" -WarningAction SilentlyContinue | Out-Null

Import-NAVApplicationObject -Path D:\work\namise.fob -DatabaseName NAV2018 -LogPath D:\work -SynchronizeSchemaChanges force -Confirm:$false

pause

But errors was shown and command was not processed succesfully.显示错误并且命令未成功处理。 Is command Import-NAVApplicationObject ekvivalent for manual import proces?命令Import-NAVApplicationObject是否适用于手动导入过程? Can be used for *.fob too?也可以用于*.fob吗?

Open Microsoft Dynamics NAV Development Environment -> Click File -> Click Import -> Select * .fob -> Message shown: The objects in D:\work\namise.fob could not be imported because there are objects already in the database with conflicting versions. Choose OK to open the Import Worksheet, or Cancel to stop the import.打开Microsoft Dynamics NAV 开发环境-> 单击File -> 单击Import -> Select * .fob -> 显示消息: The objects in D:\work\namise.fob could not be imported because there are objects already in the database with conflicting versions. Choose OK to open the Import Worksheet, or Cancel to stop the import. The objects in D:\work\namise.fob could not be imported because there are objects already in the database with conflicting versions. Choose OK to open the Import Worksheet, or Cancel to stop the import. -> Click OK -> Click Replace All -> Click OK -> Click Synchronize Schema Force (Changed will be synchronized to the database table without validation. Data in table column that are affected by the changes will be deleted) -> Click Synchronizate changes to the corresponding tables in SQL Server Yes -> Use from select All table schema changes were synchronized with force -> Shown table where is Import completed (replaced XY) -> then restart NAV services -> Done -> 点击OK -> 点击Replace All -> 点击OK -> 点击Synchronize Schema Force (Changed will be synchronized to the database table without validation. Data in table column that are affected by the changes will be deleted) -> 点击Synchronizate changes to the corresponding tables in SQL Server Yes -> 从 select 使用All table schema changes were synchronized with force -> 显示Import completed (replaced XY) -> 然后重新启动 NAV 服务 -> 完成

If is command Import-NAVApplicationObject equal to mentioned manual process.如果命令Import-NAVApplicationObject等于提到的手动过程。 What does mean these errors?这些错误是什么意思? Are solvable?可以解决吗?

Thank you a lot!十分感谢!

Kind regards亲切的问候

Lukas卢卡斯

  1. Yes the comandlet is a complete copy of the manual process.是的,comandlet 是手动过程的完整副本。 It is just a wrapper that uses finsql.exe (development environment) to run the process.它只是一个使用 finsql.exe(开发环境)运行进程的包装器。
  2. You need to use ImportAction parameter with value Overwrite https://docs.microsoft.com/en-us/powershell/module/microsoft.dynamics.nav.ide/import-navapplicationobject?view=businesscentral-ps您需要使用 ImportAction 参数,其值为Overwrite https://docs.microsoft.com/en-us/powershell/module/microsoft.dynamics.nav.ide/import-navapplicationobject?view=businesscentral-ps
  3. DO NOT SYNC SCHEMA WITH FORCE.不要使用强制同步模式。 You will lose any data in the columns that has a destructive changes.您将丢失具有破坏性更改的列中的所有数据。

The value for parameter you can find from autocomplete feature (Ctrl+Space) of powershell terminal or from description of finsql.exe parameters (as I mentioned the cmdlet is only wrapper around dev environment executable file).您可以从 powershell 终端的自动完成功能 (Ctrl+Space) 或finsql.exe参数的描述中找到参数的值(正如我提到的 cmdlet 只是围绕开发环境可执行文件的包装)。

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM