Sunday, June 26, 2016

Call was rejected by callee - While Import Data or Use Automation Variable of MS Office

Hello Friends,

I got following error when I tried to import data using configuration package in Microsoft Dynamics NAV 2015. I tried few times, but always this error throws out from Microsoft Dynamics NAV. 

Call was rejected by callee. (exception from HRESULTL 0x80010001)












When I minimize the Microsoft Dynamics NAV window I saw following screen smiling at me.






















Once I activate the office package, all started to work perfectly fine. 
This is just a very small thing, but thought it MIGHT help at least one of you out there. 

Reset Auto Increment field in Microsoft Dynamics NAV Tables

Hello Friends,

Do you know,
How to change the current value of an auto increment field? Is it possible without dropping the table? Yes it is possible.
In order to do that you have to use SQL command called DBCC CHECKIDENT 

Following is the syntax of the DBCC CHECKIDENT command.



DBCC CHECKIDENT ( <table_name> [ , { NORESEED | { RESEED [, <new_reseed_value> ] } } ] )[ WITH NO_INFOMSGS ]
table_nameIs the name of the table for which to check the current identity value. The table specified must contain an identity column. Table names must comply with the rules foridentifiers.NORESEEDSpecifies that the current identity value should not be changed.RESEEDSpecifies that the current identity value should be changed.new_reseed_valueIs the new value to use as the current value of the identity column.WITH NO_INFOMSGSSuppresses all informational messages.
To set the IDENTITY column of a table to start from 1, use the following statement :
Use [Database NAV] 
GO
DBCC CHECKIDENT ([Table Name], RESEED,0);
GO

By executing the above code you will reset the auto increment number to 0, therefore next number will be 1. That means the number you setting + 1.

You need to have following permission, in order to execute the above code :  

Caller must own the table OR member of sysadmin, db_owner or db_ddladmin fixed database role groups. 

Expected Cost(Interim Value) Posting in Dynamics NAV on Receiving Orders

Hello Friends,

Expected cost posting to GL is a beautiful functionality available in the Microsoft Dynamics NAV, But it seems many people have not understand this functionality well enough. 
Expected cost is an estimation that you would have before you get the final invoice from your vendor. This functionality allows you to have a interim accrual for the purchase before you get the actual invoice to your hand to update the G/L with the actual cost. 

How default functionality works without expected cost posting : 

Microsoft Dynamics NAV will only update the inventory at the time of receiving the purchase order and will NOT post any entries to G/L accounts. 
While updating the inventory, Dynamics NAV will post entries to Value Entry table. 

As an example if the item cost is USD 100 then value entry would like below :

Without expected cost posting - After Receiving Order (Value Entry)
Posting Date
Cost Amount (Expected)
Cost Amount (Actual)
Cost Posted to G/L
Expected Cost Posted to G/L
Cost per Unit
1/28/2016
100.00
0
0
0
100

If you navigate to the receipt document and check the related entries, you will find there are no G/L entries attached to the document. 

Once you post the Purchase Invoice with the actual cost (Cost changes to USD 120), Dynamics NAV will post entries to the G/L and Value Entry with the related cost.
Following are the entries posted to Value Entry: 
Without expected cost posting - After Invoicing (Value Entry)
Posting Date
Cost Amount (Expected)
Cost Amount (Actual)
Cost Posted to G/L
Expected Cost Posted to G/L
Cost per Unit
1/28/2016
-100.00
120.00
120.00
0
120.00

Following are the entries posted to G/L Entry:
Without expected cost posting - After Invoicing (G/L Entry)
Posting Date
G/L Account No.
Account Name
Amount
1/28/2016
2130
Inventory Account
120.00
1/28/2016
7291
Direct Cost Applied Account
-120.00

How Expected Cost Posting works

With the Expected Cost Posting set to Yes in the Inventory Setup, Microsoft Dynamics NAV will post entries to G/L at the time of receiving the order. Where earlier case it only update the inventory of the system.  
Following are the entries posted to Value Entry: (Expected cost is USD 100)
With expected cost posting - After Receiving Order (Value Entry)
Posting Date
Cost Amount (Expected)
Cost Amount (Actual)
Cost Posted to G/L
Expected Cost Posted to G/L
Cost per Unit
1/28/2016
100.00
0
0
100.00
100.00

Following are the entries posted to G/L Entry:
With expected cost posting - After Receiving Order (G/L Entry)
Posting Date
G/L Account No.
Account Name
Amount
1/28/2016
2131
Inventory Account (Interim)
100.00
1/28/2016
5530
Inventory Accrual Account (Interim)
-100.00

At the time of posting the purchase invoice, Microsoft Dynamics NAV will reverse the expected cost posted entries from the G/L and post the new entries to G/L with the actual cost. 

Following are the entries posted to Value Entry: (Cost changes to USD 120)
With expected cost posting - After Invoicing (Value Entry)
Posting Date
Cost Amount (Expected)
Cost Amount (Actual)
Cost Posted to G/L
Expected Cost Posted to G/L
Cost per Unit
1/28/2016
-100.00
120.00
120.00
-100.00
120.00


With expected cost posting - After Invoicing (G/L Entry)
Posting Date
G/L Account No.
Account Name
Amount
1/28/2016
2131
Inventory Account (Interim)
-100.00
1/28/2016
5530
Inventory Accrual Account (Interim)
100.00
1/28/2016
2130
Inventory Account
120.00
1/28/2016
7291
Direct Cost Applied Account
-120.00


To achieve above scenario you need to select the Automatic Cost Posting check box and the Expected Cost Posting to G/L check box in the Inventory Setup window.

Saturday, June 25, 2016

Dynamics NAV Upgrade from NAV 2013 to NAV 2016 IN Version

Hello Friends,

On last week i am working on one of my domestic customer's database upgrade from Dynamics NAV 2013 to NAV 2016 Indian Version.

It was very nice experience.
Do you believe that - Microsoft has forgot include upgrade codeunit objects in local toolkit.
I had got it from global toolkit folder and update for Indian localization tables and at the end of the day i had got success after solving so many issue.

Following are steps to upgrade database from NAV 2013 to NAV 2016 IN Version

Sr No.
Detail
Time (Hr)
Remarks
1
For NAV2013/2013 R2 database If a company name includes a special character, an error may display during the upgrade. In
this context, special characters include the following:
[ ~ @ # $ % & * ( ) . ! % +/ = ? ]
2
Check all companies available in database. And Rename the company by going to
File à Company à Rename
2
Import 2 Report Objects from Hotfix Download to avoid conversion issue of report from NAV 2013 to NAV 2016
0.1
Get it from attachment download link
3
In Object Designer, verify that no objects are locked
0.1

4
On the Tools menu, choose Build Server Application Objects, and then choose the Yes
button
0.1
 Make sure that all objects are in compile mode and delete unwanted – 90 thousand series objects if any.
5
Upload the Microsoft Dynamics NAV 2016 Partner license to the database
0.1
Developer Licence - Save In Database Option
6
Stop Navision Service If any pointing to Database and close all sessions
0.1

7
Clear all Microsoft Dynamics NAV Server instance records from the dbo. Server Instance
table in the database on SQL Server
0.1
 Using the SQL Mgt studio clear server instance table
8
Create a full SQL backup of the old database on SQL Server.
2
(Optional step)
9
Close the NAV 2013 Development Env and Close SQM Mgt Studio
0.1

10
Open NAV 2016 Dev Env by Run As Administrator
0.1
 Remember to open as Administrator
11
Select NAV 2013 Database to Convert to NAV 2016
0.5

12
Connect a Microsoft Dynamics NAV 2016 Server instance to the converted
database. Open the converted database in NAV 2016 and select the service from File à Database à Information
0.1
13
Set the Require Compatibility level from SQL Mgt Studio
0.1
SQL Server 2012 - it is 110
14
Check the minimum require space on database server for sync tenant process
0.1
If your database is 50 GB than minimum 125 GB Require free on database server
15
Increase the SQL Command Timeout setting for the Microsoft Dynamics NAV Server instance.
0.1
Update it to 30 min to 8 hr
16
Run the schema synchronization to complete the database conversion
From the development environment:

Open development environment as an administrator. On the Tools menu, choose
Sync. Schema For All Tables, and then choose With Validation and follow the
schema synchronization instructions.
From the Microsoft Dynamics NAV 2016 Administration Shell:
Open the Microsoft Dynamics NAV 2016 Administration Shell as an administrator,
and then run SyncNavTenant
cmdlet as follows:
SyncNavTenant
–ServerInstance <ServerInstanceName>
*Replace <ServerInstanceName> with the name of the Microsoft Dynamics NAV
Server instance that is connected to the database.
2
Run the NAV 2016 Administration Shell as Administrator and run following command

Sync-NavTenant dynamicsnav90b45778-03

It is failed for some un compile object. Compile all object from developer environment - fix the compile error of any and then run schema sync from developer or PowerShell. it will work

Build Server Application Object successfully - it should be complete.
17
Run any object to check schema sync properly. Than after delete all object except table
0.1
delete all object from NAV 2016 - except tables
18
Import merge application objects to the converted database.
When you import the FOB file, if you experience metadata conflicts, use the
Import Worksheet to handle these conflicts.
Finally, on the dialog box for selecting the schema synchronization, set the
Synchronize Schema option to Later.
0.2
Import objects with later Option.
Make sure that  Merge Object contain Upgrade Toolkit Object in it.
19
Increase the Size of field 16361 "Sub. Comp. Location" in Item Tables in merged objects before import to NAV 2016 database
0.1
Config with standard field copy mode so I have increase the size of field in merge database
20
Import the Upgrade Toolkit Objects with Synchronize Schema option to Later.
0.1
With later Option (if it is exists in your merged object in step 17 than it is not require)
21
Run the Sync. Schema For All Tables – With Validation option from the
development environment
OR
Run the SyncNavTenant
cmdlet from the Microsoft Dynamics NAV 2016
Administration Shell.
2
Run the NAV 2016 Administration Shell as Administrator and run following command

Sync-NavTenant dynamicsnav90b45778-03

it should be completed with no error. If any error exists than solve It before start data upgrade
22
Run the data upgrade process
2
Run it from Developer Env By - Tools --> DayaUpgrade  --> Start with Default option
23
Import Merged Role & Permission
0.5
Using XMLPort Import Permission

Note - Do not use upgrade toolkit objects provide in "Local Objects" folder in DVD of NAV 2016 IN Version.

Following error will occur at objects sync steps:






































This error has come because of there is no upgrade codeunit exists in toolkit database that will transfer the data in buffer tables.

So i have modified my self the upgrade toolkit objects.
Microsoft has reduce the size of some of the Indian localization fields like:

  • Vendor Location (from Code 20 to 10)
  • Location Code (from Code 20 to 10)
  • etc

We have setup Table Sync Mode = Check for Indian localization database table to avoid this issue.
I have added following code in upgrade toolkit objects.





















Download the updated toolkit other objects at following link:
Click Here to Download

I hope it will help you in future
Please write the comment if you find any issue in upgrade.

Thank you
Keep Sharing...Keep Growing....