Skip to main content

MSDYN365BC - Export-NAVApplicationObject '"' is not an option. The Existing options are:No,Yes.

Hi Readers,

Today while working on a project we faced an issue. The issue occurs while using the Powershell cmdlet Export-NAVApplicationObject.

The version that can be replicated in -
  • Microsoft Dynamics 365 Business Central April'19 on-premises.
  • Cumulative Update 10.
  • Application Build 14.11.41204
  • Platform Build 14.11.41143

In this article, we will discuss why this error and How to Solve this issue?

When is the error? 

When you try to use Powershell cmdlet Export-NAVApplicationObject  either using Dynamics NAV Development Shell or using Powershell after loading the Dynamics NAV Module.

What is the error?

'"' is not an option.
The existing options are:
No, Yes



What we tried?
  1. Removed Filter in the cmdlet to see maybe we are applying filter incorrectly. 
  2. Check License Saved in Database.
  3. Check Permission in the Folder where the file is to be written/saved.

Why is the error? 

So after tried all standard processes and solutions when nothing got fixed, this problem was brought to my notice.

Spun up a Microsoft Dynamics 365 Business Central April'19 on-premises CU 09 docker environment and test Export-NAVApplicationObject and everything worked file.

Now thought to compare NAV Modules from CU09 and CU10 to see what was changed. 

What was Changed? - 

I don't know How PowerShell is written but when I did compare I see Microsoft added a New parameter in Function RunNavIdeCommand. 

This Parameter is SuppressElevationCheck as shown below.


So I think Microsoft will fix the issue with this new parameter in the upcoming cumulative Update.

Temporary Fix?

As a temporary fix, you can replace Microsoft.Dynamics.Nav.Ide file from Business Central 14 Cumulative Update 09 to Installed Folder of Cumulative Update 10.

After the Replacing file, all PowerShell cmdlets will run successfully.

Let me know your views as a comment on this article.

Stay connected for more.

Regards,
Saurav Dhyani
www.sauravdhyani.com

Comments

  1. Hi,

    Freddy also blogged about this issue here: https://freddysblog.com/2020/02/22/small-issue-in-bc-2019-wave-1-cu9/
    He also shows how to patch the powershell to fix the issue.

    Best Regards,
    Gert Lynge
    www.dabbler.dk

    ReplyDelete

Post a Comment

Popular posts from this blog

VIEW SERVER STATE permission on SQL Server?

Hi all, Sometime While trying to Login into a database we face an error message as shown below. --------------------------- Microsoft Dynamics NAV Classic --------------------------- You cannot start Microsoft Dynamics NAV Classic because you do not have the VIEW SERVER STATE permission on SQL Server. Contact your system administrator. --------------------------- OK    ---------------------------

BC 21 and Higher - PowerShell Cmdlet (Replacement of Business Central Administration).

Hi Readers, As discussed in last article about deprecating of Business Central Administration, there are few common actions that we use in administration till Business Central 20. For our on-prem customers, we will still require doing activities. As Microsoft suggest we need to start using PowerShell cmdlet.    Let's see how to do those via PowerShell, or Administration Shell. I will be keep adding commands as you comment to this article.

Send Mail with Attachment From Navision.

Hi all, We have seen how to save a report into PDF and how to send mail to a customer. Let's link these two post in one i.e. Mailing statement to a customer into PDF Format. This article is part of the Series. Please Refer  Table of Content here . If you have the old objects set let me brief you what I will be changing -