Quantcast
Channel: My Errors & My Solutions
Viewing all 123 articles
Browse latest View live

SQL Server upgrade from Express

$
0
0

My Errors & My Solutions
My Errors & My Solutions - It Could Happen To You

To upgrade SQL Server from Express edition to a different edition of the same version follow the steps: Insert the SQL Server installation media of the new edition you want upgrade to. From the root folder, double-click Setup.exe. SQL Server Installation Center click Maintenance, and then select Edition Upgrade. Did my HOW TO help you? … Continue reading SQL Server upgrade from Express

SQL Server upgrade from Express
Eclipses


You do not have the following permissions on TableData

$
0
0

My Errors & My Solutions
My Errors & My Solutions - It Could Happen To You

When we develop in Microsoft Dynamics NAV, we use a Developer License that has permissions to the standard objects different of the license of the final customer.

Using the customer’s license you may encounter error messages as follows:

You do not have the following permissions on TableData {TableName}: {Read/Insert/Modify/Delete}

An example could be running a Codeunit that modify a record in the standard table 6550 Whse. Item Tracking Line.
You do not have the following permissions on TableData

Considerations:
I’m pretty sure that most of you after will receive an error like this, first will search the table number of the one in the error message. Then you will realize that is in the range of the standard objects (e.g. 6550) and you will start thinking why this error didn’t happen during your tests.

Well, the answer is obvious if you think that probably you tested using the Developer license and that the Customer’s license has different permission to access to the standard objects.

Causes:
Create a new Page using the wizard of type List to show all the fields of the system table Permission Range.
Then run it with the Customer’s license and filter for the object in the error message (i.e. TableData 6550)
Permission Ranges
As you can see, this TableData in the Customer’s license has Insert/Modify/Delete permission as Indirect. This means that you CANNOT do those action directly in that table.

Note: Remind that if you are saving the license in the database or you upload a new license you must restart the instance service.

In the meantime you realized (maybe debugging) that the code that caused this error is in a Codeunit. Bingo!!!

You do not have the following permissions on TableData

Solution:
Open the Codeunit in design and assign in the Properties the correct Permissions to the tables
Permissions

Did my solution solve your problem? Leave a comment.

You do not have the following permissions on TableData
Eclipses

Adobe Flash Player has stopped potentially unsafe operation

$
0
0

My Errors & My Solutions
My Errors & My Solutions - It Could Happen To You

Recently I did a training with materials offline using Adobe Flash.

Sources are usually in a compressed file or a CD/DVD drive, and when I ran the starting web page using Microsoft Internet Explorer I’ve received the following error message:

Adobe Flash Player Security

Adobe Flash Player has stopped a potentially unsafe operation.

The following local application on your computer or network:
{PATH}
is trying to communicate with this Internet-enabled location:
{PATH}

To let this application communicate with the Internet, click Settings.
You must restart the application after changing your settings.
OK Settings…

Adobe Flash Player has stopped potentially unsafe operation

Note:

  1. This error message appeared only using Microsoft Internet Explorer and NOT with Google Chrome.
  2. Unfortunately clicking the button Settings the error message disappears without show any configuration screen and to receive again the error I have to close the browser and re-open it.

Cause:
As the error message itself is saying, Adobe Flash player stopped the operation because a local file wants to communicate with an “Internet-enabled location” that in our case is local but it could be on internet and for this reason dangerous (“unsafe operation”).

Adobe Flash Player has stopped potentially unsafe operation

Solution:

  1. Access to the local Flash Player Settings Manager (click Start > Settings > Control Panel > Flash Player)
    Adobe Flash Player Settings Manager
  2. click the Advanced tab then on Trusted Location Settings
    Adobe Flash Player Settings Manager - Advanced
  3. click Add…
    Trusted Location Settings
  4. click Add File… to select the .sfw file or Add Folder… to select the folder or CD/DVD drive then Confirm
    Add Site
  5. Close the browser

Did my solution solve your problem? Leave a comment.

Adobe Flash Player has stopped potentially unsafe operation
Eclipses

Page contains several Actions with the same ID

$
0
0

My Errors & My Solutions
My Errors & My Solutions - It Could Happen To You

Microsoft Dynamics NAV
—————————
Page {PageNo} {PageName} contains several Actions with the same ID {ActionID}. Redesign the page to remove duplicate Action IDs.
—————————
OK
—————————

contains several Actions with the same ID

Solution:
Delete lines for page in the errror in the 2000000074 Profile Metadata system table.

Did my solution solve your problem? Leave a comment.

Page contains several Actions with the same ID
Eclipses

HOW TO check and install Xamarin updates in Visual Studio

HOW TO show BigText in a message window in C/AL

$
0
0

My Errors & My Solutions
My Errors & My Solutions - It Could Happen To You

According to the MSDN documentation in the link BigText Data Type

"cannot be shown in a message window"

This example requires that you create the following variables:

Name DataType Subtype
varBigText BigText

It is true that you cannot insert the BigText in a message

MESSAGE(varBigText);

HOW TO show BigText in a message window in C/AL?

You can show the content of the variable easily using the FORMAT Function (Code, Text) to convert the BigText in a String.

MESSAGE(FORMAT(varBigText));

Did my HOW TO help you? Leave a reply.

HOW TO show BigText in a message window in C/AL
Eclipses

HOW TO run SQL query for multiple companies in NAV database

$
0
0

In Micrososoft Dynamics NAV, tables with property DataPerCompany = No are stored in SQL in multiple tables having the company name as prefix, than $ and the name.

Example, the Customer table in Cronus Company:

CRONUS UK Ltd_$Customer

The following T-SQL Script retrieves the list of the companies, loop through them and use the Company Name as prefix (@pref) to run a query (@sql_ext).

DECLARE @pref nvarchar(30)
DECLARE @sql_ext nvarchar(max)

DECLARE company_cursor CURSOR FOR 
SELECT replace(Name,'.','_') FROM Company

OPEN company_cursor
FETCH NEXT FROM company_cursor INTO @pref 

WHILE @@FETCH_STATUS = 0
BEGIN

SELECT @sql_ext = N'SELECT * FROM [dbo].[' + @pref + '$Inquiry Note] WHERE DATALENGTH([Note]) < 4'

EXEC sp_executesql @sql_ext
FETCH NEXT FROM company_cursor INTO @pref 
END

Here find another reading suggestion, this time in C/AL: HOW TO change data for all Companies in NAV

Did my HOW TO help you? Leave a reply.

HOW TO set NAV Service Startup Type via PowerShell

$
0
0

When you create a new Instance using the command New-NAVServerInstance it will set the Startup Type of the NAV Service as “Automatic” by default.

I haven’t found any NAV command to change it, so let us think about NAV Service as any other Windows Service.

In PowerShell there is a command Set-Service that allows to change an existing Service.

NAV Service names have the following format

MicrosoftDynamicsNavServer$<ServerInstance>

where <ServerInstance> is the name of the NAV Instance

So running the following command we can change the Startup Type to Automatic, Manual or Disabled.

Set-Service –Name "MicrosoftDynamicsNavServer`$DynamicsNAV100" –StartupType Manual

This example will set the NAV Service for the Server Instance DynamicsNAV100 to Manual.

Unfortunately -StartupType parameter does not have a value for Automatic (Delayed Start)

So it seams a bit tricky but just looking into the register I’ve noted that the other services that had Automatic (Delayed Start) as Startup Type have a REG_DWORD value called “DelayedAutoStart” with value 1 under HKLM\System\CurrentControlSet\Services\

So the idea is use the previous command to set the Startup Type to Automatic then add REG_DWORD via script

Set-Service –Name "MicrosoftDynamicsNavServer`$DynamicsNAV100" –StartupType Automatic
Set-ItemProperty -Path "Registry::HKLM\System\CurrentControlSet\Services\MicrosoftDynamicsNavServer`$DynamicsNAV100" -Name "DelayedAutostart" -Value 1 -Type DWORD

In reality we could setup everything from the registry

Set-ItemProperty -Path "Registry::HKLM\System\CurrentControlSet\Services\MicrosoftDynamicsNavServer`$DynamicsNAV100" -Name "Start" -Value 2 -Type DWORD
Set-ItemProperty -Path "Registry::HKLM\System\CurrentControlSet\Services\MicrosoftDynamicsNavServer`$DynamicsNAV100" -Name "DelayedAutostart" -Value 1 -Type DWORD

NOTE 1: Both scripts will work only if the current Startup Type is different of Automatic
NOTE 2: “DelayedAutostart” DWORD will have effect only if you setup the Service Type as Automatic.

Did my HOW TO help you? Leave a reply.


The Microsoft Dynamics NAV server is currently not ready to serve requests

$
0
0

Searching on internet I’ve found a few of posts with solution for this error, they where quite old (2014) and the cause of the error was that account used by the NAV Server was not db_owner in the database. The solution was to grant that user to db_owner.

Well the issue now is that the account used to run the NAV Server in my database is db_owner.

What is the error? What is the meaning of this error message?

The Microsoft Dynamics NAV server is currently not ready to serve requests. Try again later or contact your system administrator.

To be honest this error message did not help me to understand what was the issue, even in the Event Log there was not extra info.

Do not ask me the meaning of this error message and I do not know yet the causes but I found a solution (this is the mission of my website, share my solutions).

Solution:
Navigate to the following folder

C:\ProgramData\Microsoft\Microsoft Dynamics NAV\<NAVVersionNumber>\Server

and delete the folder with the name of NAV Instance of which you had the error. Then folders have the same name of the Service, with the following format

MicrosoftDynamicsNavServer$<ServerInstance>

where <ServerInstance> is the name of the NAV Instance.
At the end restart the NAV Instance.

Note: Don’t be worry, after you will restart the instance, this folder will be recreated.

Did my solution fix your issue? Leave a comment.

HOW TO check and install Xamarin updates in Visual Studio

$
0
0

Probably a message has been shown to you in Visual Sutdio about a new version of Xamarin.

HOW TO check and install Xamarin updates in Visual Studio?

Navigate the Visual Studio menu Tools -> Options…
visual-studio-menu-tools-options

then Xamarin -> Other and click the link Check Now
options-xamarin-other-check-now

Did my HOW TO help you? Leave a reply.

HOW TO show BigText in a message window in C/AL

$
0
0

According to the MSDN documentation in the link BigText Data Type

"cannot be shown in a message window"

This example requires that you create the following variables:

Name DataType Subtype
varBigText BigText

It is true that you cannot insert the BigText in a message

MESSAGE(varBigText);

HOW TO show BigText in a message window in C/AL?

You can show the content of the variable easily using the FORMAT Function (Code, Text) to convert the BigText in a String.

MESSAGE(FORMAT(varBigText));

Did my HOW TO help you? Leave a reply.

HOW TO run SQL query for multiple companies in NAV database

$
0
0

In Micrososoft Dynamics NAV, tables with property DataPerCompany = No are stored in SQL in multiple tables having the company name as prefix, than $ and the name.

Example, the Customer table in Cronus Company:

CRONUS UK Ltd_$Customer

The following T-SQL Script retrieves the list of the companies, loop through them and use the Company Name as prefix (@pref) to run a query (@sql_ext).

DECLARE @pref nvarchar(30)
DECLARE @sql_ext nvarchar(max)

DECLARE company_cursor CURSOR FOR
SELECT replace(Name,'.','_') FROM Company

OPEN company_cursor
FETCH NEXT FROM company_cursor INTO @pref

WHILE @@FETCH_STATUS = 0
BEGIN

SELECT @sql_ext = N'SELECT * FROM [dbo].[' + @pref + '$Inquiry Note] WHERE DATALENGTH([Note]) < 4'

EXEC sp_executesql @sql_ext
FETCH NEXT FROM company_cursor INTO @pref
END

Here find another reading suggestion, this time in C/AL: HOW TO change data for all Companies in NAV

Did my HOW TO help you? Leave a reply.

HOW TO set NAV Service Startup Type via PowerShell

$
0
0

When you create a new Instance using the command New-NAVServerInstance it will set the Startup Type of the NAV Service as “Automatic” by default.

I haven’t found any NAV command to change it, so let us think about NAV Service as any other Windows Service.

In PowerShell there is a command Set-Service that allows to change an existing Service.

NAV Service names have the following format

MicrosoftDynamicsNavServer$<ServerInstance>

where <ServerInstance> is the name of the NAV Instance

So running the following command we can change the Startup Type to Automatic, Manual or Disabled.

Set-Service –Name "MicrosoftDynamicsNavServer`$DynamicsNAV100" –StartupType Manual

This example will set the NAV Service for the Server Instance DynamicsNAV100 to Manual.

Unfortunately -StartupType parameter does not have a value for Automatic (Delayed Start)

So it seams a bit tricky but just looking into the register I’ve noted that the other services that had Automatic (Delayed Start) as Startup Type have a REG_DWORD value called “DelayedAutoStart” with value 1 under HKLM\System\CurrentControlSet\Services\

So the idea is use the previous command to set the Startup Type to Automatic then add REG_DWORD via script

Set-Service –Name "MicrosoftDynamicsNavServer`$DynamicsNAV100" –StartupType Automatic
Set-ItemProperty -Path "Registry::HKLM\System\CurrentControlSet\Services\MicrosoftDynamicsNavServer`$DynamicsNAV100" -Name "DelayedAutostart" -Value 1 -Type DWORD

In reality we could setup everything from the registry

Set-ItemProperty -Path "Registry::HKLM\System\CurrentControlSet\Services\MicrosoftDynamicsNavServer`$DynamicsNAV100" -Name "Start" -Value 2 -Type DWORD
Set-ItemProperty -Path "Registry::HKLM\System\CurrentControlSet\Services\MicrosoftDynamicsNavServer`$DynamicsNAV100" -Name "DelayedAutostart" -Value 1 -Type DWORD

NOTE 1: Both scripts will work only if the current Startup Type is different of Automatic
NOTE 2: “DelayedAutostart” DWORD will have effect only if you setup the Service Type as Automatic.

Did my HOW TO help you? Leave a reply.

The Microsoft Dynamics NAV server is currently not ready to serve requests

$
0
0

Searching on internet I’ve found a few of posts with solution for this error, they were quite old (2014) and the cause of the error was that the account used by the NAV Server was not db_owner in the database. The solution was to grant that user to db_owner.

Well the issue now is that the account used to run the NAV Server in my database is db_owner.

What is the error? What is the meaning of this error message?

The Microsoft Dynamics NAV server is currently not ready to serve requests. Try again later or contact your system administrator.

To be honest this error message did not help me to understand what was the issue, even in the Event Log there was not extra info.

Do not ask me the meaning of this error message and I do not know yet the causes but I found a solution (this is the mission of my website, share my solutions).

Solution:
Navigate to the following folder

C:\ProgramData\Microsoft\Microsoft Dynamics NAV\<NAVVersionNumber>\Server

and delete the folder with the name of NAV Instance of which you had the error. Then folders have the same name of the Service, with the following format

MicrosoftDynamicsNavServer$<ServerInstance>

where <ServerInstance> is the name of the NAV Instance.
At the end restart the NAV Instance.

Note: Don’t be worry, after you will restart the instance, this folder will be recreated.

Did my solution fix your issue? Leave a comment.

Cannot access a disposed object. Object name: ‘Tenant’

$
0
0

I’ve created a new NAV Instance, setup the correct database name then tried to run the Service and I’ve received the following error message:

Error
—————————

ServerInstance ‘MicrosoftDynamicsNavServer$NewInstance’ failed to reach status ‘Running’ on this server due to the following error: ‘Cannot start the service.’. Additional information may be in the event log of the server.
—————————

OK
—————————

As suggested by the error message I’ve opened the Event Log to look for additional information and I’ve found the following error message:

Cannot access a disposed object. Object name: ‘Tenant’.

What does this error mean? Well the error message does not help us to fix this issue but I’ve found a solution and I’m here to share it with you (this is the mission of my website, share my solutions).

Cause:
The new instance is setup to use a port (Management Services Port, Client Services Port, SOAP Services Port or OData Services Port) that is already in use but an existing running NAV Instance. In my case was the SOAP Services Port.

Solution:
Change the port number that is already used by another running NAV Instance or stop the other service using this port.

Did my solution fix your issue? Leave a comment.


Cannot access a disposed object. Object name: ‘NavSystemTenant’

$
0
0

I’ve created a new NAV Instance, setup the correct database name then tried to run the Service and I’ve received the following error message:

Error
—————————

ServerInstance ‘MicrosoftDynamicsNavServer$NewInstance’ failed to reach status ‘Running’ on this server due to the following error: ‘Cannot start the service.’. Additional information may be in the event log of the server.
—————————

OK
—————————

As suggested by the error message I’ve opened the Event Log to look for additional information and I’ve found the following error message:

Cannot access a disposed object. Object name: ‘NavSystemTenant’.

What does this error mean? Well the error message does not help us to fix this issue but I’ve found a solution and I’m here to share it with you (this is the mission of my website, share my solutions).

Cause:
The new instance is setup to use a port (Management Services Port, Client Services Port, SOAP Services Port or OData Services Port) that is already in use by an existing running NAV Instance. In my case was the SOAP Services Port.

Solution:
Change the port number to a one which is not being used by any other instance, or stop the other service using this port.

Did my solution fix your issue? Leave a comment.

There are some objects locked in the database. You must unlock these objects before upgrading the database

$
0
0

—————————
Microsoft Dynamics NAV Development Environment
—————————
There are some objects locked in the database. You must unlock these objects before upgrading the database.
—————————
OK
—————————

Solution:
Execute the following SQL Query, remind to USE your database name (replace NAVDatabase)

USE [NAVDatabase]

UPDATE [Object] SET [Locked] = 0, [Locked By] = '' WHERE [Locked] = 1

then close the query window (otherwise the connection will still remain active).

Did my solution solve your problem? Leave a reply.

The email address “” is not valid.

$
0
0

A Job Queue Entry running the Codeunit 1509 Notification Entry Dispatcher fails with the following error message:

The email address “” is not valid.

Cause:
The User ID that runs the Job Queue Entry does not exist in the User Setup or it has blank email address.

Solution:
Verify that the User ID that runs the Job Queue Entry exists in the User Setup table, if not create it, then populate the E-Mail field.

Did my solution solve your problem? Leave a reply.

the process may not have access rights for the private key

$
0
0

I’m changing a NAV Instance to use a new certificate but the service fails to run, looking at the Event Viewer I can find the following error message:
The service <ServiceName> failed to start. This could be caused by a configuration error. Detailed error information: System.ArgumentException: It is likely that certificate ‘<CertificateSubject>’ may not have a private key that is capable of key exchange or the process may not have access rights for the private key.

Solution:
Run MMC, click on File -> Add/Remove Snap-in…, then add Certificates, selecting Computer Account and Local Computer
NOTE: Identify the relevant certificate and verify that a small yellow key is shown in the icon, if not it means you don’t have the private key for this certificate so you need to import the certificate with the Private Key.
Right-click on the certificate then select All Tasks -> Manage Private Keys
Click Add in the permissions window
Add the Service Account that run the NAV Service (in my case it was “Network Service”).

Did my solution solve your problem? Leave a reply.

HOW TO change version from Visual Studio 2015 Enterprise to Professional

Viewing all 123 articles
Browse latest View live