Dynamics NAV

Monday, 12 January 2015

C/AL Coding Guidelines -NAV2015

Microsoft has Published C/AL Coding Guidelines that they use at Microsoft Development Center at Copenhagen

Please find them in below link.

https://community.dynamics.com/nav/w/designpatterns/156.cal-coding-guidelines.aspx

Saturday, 10 January 2015

Multi-tenancy from NAV2013R2

Multi-tenancy is a principle in software architecture where a single instance of the application runs on a server (or group of servers) and serves multiple clients or tenants. Multi-tenant hosting for Dynamics NAV 2013 R2 is available to be run on both Azure cloud and partner-hosted deployments.


“Multi-tenancy is all about having a lot of customers running the same application,”

The multi-tenancy architecture in NAV 2013 R2 consists of a single application database and multiple data databases. The application database only serves as a source for metadata and source code,”. “Data is separated in tenant databases. One NAV Server Tier (NST) can serve one application database and multiple tenant databases. [On] the other hand the application database and tenant databases can be opened by multiple servers. They even can sit on different SQL servers. This makes the model very flexible and scalable.”


Friday, 9 January 2015

New Cumulative Updates 1 and 2 for NAV2015

Cumulative Updates 1 and 2 for Microsoft Dynamics NAV 2015 has bee released already
CU1 resolves a lot of small problems in the platform area. Also, this CU has application improvements in almost all functional area.
You can find and download  Cumulative Update1 here. This CU1 is named as Build 38457 
CU2 includes all application (Administration, Finance, Inventory, Manufacturing, Marketing, Purchase, Sales, Service and Warehouse) and platform hotfixes and regulatory features that have been for Microsoft Dynamics NAV 2015. It has a lot hotfixes for following localisations: Germany, Denmark, Spanish, Finland, France, Italy, North America, Netherlands, Norway, Russia, Sweden, United Kingdom,
You can download Cumulative Update 2 for Microsoft Dynamics NAV 2015 from here.   This CU2 is named as Build 38798.

UpdatePropagation page Property in NAV2015

Microsoft has introduced a new property UpdatePropagation  in page level in   Nav2015. This property makes it possible to update a parent page from a subpage automatically without using the page Refresh button.

 From sub page request main page to do update instead. The parent page first updates itself and then the subpage

 The UpdatePropagation property is available on part controls and has two options those are Subpage and Both.

If UpdatePropagation is set to Subpage, an update action will update the subpage only.
If UpdatePropagation is set to Both, an update action will update both the main page and the subpage. This is useful if a value on the subpage changes, and you want a main page total to be refreshed automatically. Also, it works on all NAV Clients, doesn’t matter is this Windows, Web or Tablet client.
We can use the UpdatePropagation property to update a main page total, when the amount on the subpage lines is updated. To do that, add a CurrPage.UPDATE(); call, for example, in the OnValidate trigger on the subpage to have the UpdatePropagationproperty take effect.


Thursday, 8 January 2015

NAV2015 Compilation Error-Unable to process changes because Service Instance has not created

The below error has  occurred  while compile or save the objects in NAV2015




 To resolve this error,we need to Create a service  or change the database name to the existing service
    and restart the service.

Check the server ports,server name,server instance name has populated or not as shown below 

Open Navision C\SIDE client Tools --> Options then these values.
                   



 

NAV2015 Error-Unable to process changes because current user cannot be authenticated

The below error has  occurred  while compile the objects in NAV2015


To resolve this error,we need to run either the below query in SQL Server

USE [Database Name]
GO
delete from [dbo].[User]
delete from [dbo].[Access Control]
delete from [dbo].[User Property]
delete from [dbo].[Page Data Personalization]
delete from [dbo].[User Default Style Sheet]
delete from [dbo].[User Metadata]
delete from [dbo].[User Personalization]

or provide the required permission to user.

Friday, 2 January 2015

How to restrict multiple logins for the same user ID

Some time we login multiple times with same user ID,but if we want to restrict this,please follow the below

In NAV 2013 and Later , Active Sessions (Table ID - 2000000110) gives 

 all the active session into the database.

For Restricting multiple Login we can use Codeunit 40 - LogInManagement.

So let's see how we can achieve this -

1. Design Codeunit 40, Navigate to Function CompanyOpen().

2. Append Below Lines as below -

the standard code looks like below
---------------------------------------------------
IF GUIALLOWED THEN
  LogInStart;
---------------------------------------------------

After
---------------------------------------------------
//Add code here BEGIN
ActiveSession.SETRANGE("User ID",USERID);
ActiveSession.SETRANGE("Client Type",ActiveSession."Client Type"::"Windows Client");
IF ActiveSession.COUNT > 1 THEN
  ERROR('You are Already Logined');
//Add code here END

IF GUIALLOWED THEN
  LogInStart;
---------------------------------------------------

The Client Type have following Options -
Windows Client,SharePoint Client,Web Service,Client Service,NAS,Background,Management Client,Web Client,Unknown

Above Code will Stop Windows Client to use multiple session with same User ID.

How it executes:

I will get the below error message while runnning RTC client second time which my first RTC client is already opened.