Wednesday, March 15, 2017

How to configure a Role Center in Role Tailored Client of MS Dynamics NAV 2017?

Requiremnt :-

To configure a Role Center Page in Nav 2017 for a User which is defined in User Personalisation .

Reference Screen :-


MS Dynamics NAV Screen 1
I am Going to configure ACCOUNTANT User Personalization.
Solution :-

Step 1. Open CMD from Start Menu.
And type the following on cmd.

cd C:\Program Files (x86)\Microsoft Dynamics NAV\70\RoleTailored Client


MS Dynamics NAV 02

Step 2.
Now type the following command to open and configure the Role Center profile.
Microsoft.Dynamics.Nav.Client.exe -configure -profile:"ACCOUNTANT"


To Open the profile.

Step 3. Now Configure the profile. Means now you can remove the Department and other profiles.

MS Dynamics NAV 04

Step 4. Remove the Department and other Menus whatsoever you want to remove.
Now see the final Result. It will automatically restart your NAV Profile and your desired Departmen will be removed.


MS Dynamics NAV Reference




You can also hide a Module from Menusuite but it will hide it from all the profiles of  NAV users so this above method is far better to accept.

You can check other Links from here :-

Goto this link.

Thursday, March 9, 2017

Microsoft Dynamics Nav 2017 Cumulative Update Summary and hotfixes for March 2017.

Microsoft Dynamics Nav 2017 - Update March 2017


Microsoft has just released its fourth cumulative update for MS Dynamics Nav 2017.
Cumulative Update 04 For MS Dynamics NAV 2017

Details :-


Download Link :-

Direct Download


GST for MS Dynamics NAV 2016.

Microsoft will launch the GST hotfix for Indian Version before 4 weeks from the NAV implementation in India by Government. It will be the biggest release and development area.

So wait for the new release of the hot fix.

To learn implementation of NAV GST please comment and subscribe our blog.

Wednesday, March 1, 2017

How to create USER in MS Dynamics NAV 2013 R2 ?

This post is to resolve the error while restoring a new database in SQL Server and connecting it with NAV development environment.

The error we Get while connecting with SQL from NAV development Environment.

You do not have access to Microsoft Dynamics NAV. Verify that you have been set up as a valid user in Microsoft Dynamics NAV.

Solution :-
 You can delete all users from SQL Database using the Querry.

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];

You may check it in my Blog Post for NAV 2016 also.


Check if you can connect with RTC Client.

If still error exists , then you can create user from powershell , check here to create user with powershell.


To create user in NAV 2013 R2 , you have to execute the querry, just copy paste this querry in SQl and replace the 
DB Name and domain name.


SET NOCOUNT ON
GO
USE [DATABASE Name]  -- NAV 2013 database you want to use
GO
DECLARE @UserID varchar(100)
SET @UserID = 'Domain\Username'  -- Windows Login you want to add
-- Get security identifier (SID) for specified user.  Login must be setup in SQL Server first.
DECLARE @BinarySID binary(100)
SELECT @BinarySID = sid FROM sys.syslogins WHERE name = @UserID
IF @BinarySID IS NULL
  RAISERROR('SQL Server login not found for User %s.', 10, 1, @UserID)
-- SID is stored in the User table as a formatted string.  Need to convert it.
DECLARE @StringSID varchar(238)
DECLARE @i AS int
DECLARE @j AS int
DECLARE @Grp AS int
SELECT @StringSID = 'S-'
    + CONVERT(VARCHAR, CONVERT(INT, CONVERT(VARBINARY, SUBSTRING(@BinarySID, 1, 1))))
SELECT @StringSID = @StringSID + '-'
    + CONVERT(VARCHAR, CONVERT(INT, CONVERT(VARBINARY, SUBSTRING(@BinarySID, 3, 6))))
SET @j = 9
SET @i = LEN(@BinarySID)
SET @Grp = 1
WHILE (@j < @i) AND (@Grp <= 5) BEGIN
  SET @Grp = @Grp + 1
  DECLARE @val BINARY(4)
  SELECT @val = SUBSTRING(@BinarySID, @j, 4)
  SELECT @StringSID = @StringSID + '-'
    + CONVERT(VARCHAR, CONVERT(BIGINT, CONVERT(VARBINARY, REVERSE(CONVERT(VARBINARY, @val)))))
  SET @j = @j + 
END
-- Check to see if User record already exists
DECLARE @UserGUID uniqueidentifier
SELECT @UserGUID = [User Security ID]
FROM [User] WHERE [Windows Security ID] = @StringSID
IF @UserGUID IS NOT NULL
  PRINT 'User ID ' + @UserID + ' already exists in User table.'
 
ELSE BEGIN
  -- Generate new GUID for NAV security ID
  SET @UserGUID = NEWID()
 
  -- Create User record
  INSERT INTO [User]
  ([User Security ID], [User Name], [Full Name], [State], [Expiry Date], [Windows Security ID], [Change Password],[License Type],[Authentication Email])
  VALUES(@UserGUID, @UserID, '', 0, '1/1/1753', @StringSID, 0, 0 ,'EmailID@Domain.com') 
  PRINT 'Created User record for User ID ' + @UserID + '. - ' + CAST(@@ROWCOUNT AS varchar) + ' row(s) affected.'
END
-- Check to see if user is assigned to SUPER role 
IF EXISTS(SELECT * FROM [Access Control] WHERE [User Security ID] = @UserGUID AND [Role ID] = 'SUPER' AND [Company Name] = '')
  PRINT 'User ID ' + @UserID + ' is already assigned to SUPER role.'
 
ELSE BEGIN 
  -- Create Access Control record to add user to SUPER role
  INSERT INTO [Access Control]
  ([User Security ID], [Role ID], [Company Name])
  VALUES(@UserGUID, 'SUPER', '')
  PRINT 'Added User ID ' + @UserID + ' to SUPER role. - ' + CAST(@@ROWCOUNT AS varchar) + ' row(s) affected.'
END
-- User Property record required to allow login
IF EXISTS(SELECT * FROM [User Property] WHERE [User Security ID] = @UserGUID)
  PRINT 'User Property record already exists for User ID ' + @UserID + '.'
 
ELSE BEGIN
  INSERT INTO [User Property]
  ([User Security ID], [Password], [Name Identifier], [Authentication Key], [WebServices Key], [WebServices Key Expiry Date],[Authentication Object ID])
  VALUES(@UserGUID, '', '', '', '', '1/1/1753','')
  PRINT 'Created User Property record for User ID ' + @UserID + '. - ' +  CAST(@@ROWCOUNT AS varchar) + ' row(s) affected.'
END
SET NOCOUNT OFF
GO
 

And execute the Querry. Now you will be able to connect with NAV development.

How to create user in MS Dynamics nav from SQL Server


You can also download the Querry For NAV 2013 R2 from Here.


You can also refer to other website here :-


I hope I had Explained the steps clearly if you like the post and it helped you then please share our post and subscribe to our blog post.

Thanks.