Friday, March 25, 2016

NAV RTC Client Crash - Role & Permission / Other Issue

Hello Friends,

Many time we have face an un-expected behavior of NAV RTC Client.
It is crash when particular/all user try do some specific action.

There are multiple scenario when NAV Crashing.
Let us look on that.

1) NAV Crash - When user try to open RTC Client















Error Reason - User has assign some invalid permission set.

Detail - Some time we have create the role & permission set using configuration package and import some invalid permission lines in table

To found out the solution I have delete one by one role assign to user and found out there is issue with one customize role created by user


There is one invalid line is created in role and permission (user has import the role using configuration package and there is one invalid line is created as following)






























Solution - i have delete that invalid permission line and issue is solved.

2)  NAV Crash when document page refresh

Microsoft.Dynamics.Nav.Client has stopped working











Error Reason - User doesn't have the factbox page permission attached on document page

Solution - Find the all factbox type page in project and add this pages permission in Basic/New Role
and assign that role to user having that issue

List of factbox pages

ID
Name
699
Dimension Set Entries FactBox
805
Online Map Parameter FactBox
840
CF Forecast Statistics FactBox
917
Component - Item FactBox
956
Actual/Sched. Summary FactBox
957
Time Sheet Status FactBox
964
Period Summary Archive FactBox
971
Activity Details FactBox
8633
Config. Questions Factbox
8634
Config. Package Table Factbox
8635
Config. Related Tables Factbox
9080
Sales Hist. Sell-to FactBox
9081
Sales Hist. Bill-to FactBox
9082
Customer Statistics FactBox
9083
Dimensions FactBox
9084
Customer Details FactBox
9085
Service Hist. Sell-to FactBox
9086
Service Hist. Bill-to FactBox
9087
Sales Line FactBox
9088
Service Item Line FactBox
9089
Item Invoicing FactBox
9090
Item Replenishment FactBox
9091
Item Planning FactBox
9092
Approval FactBox
9093
Vendor Details FactBox
9094
Vendor Statistics FactBox
9095
Vendor Hist. Buy-from FactBox
9096
Vendor Hist. Pay-to FactBox
9098
Job No. of Prices FactBox
9099
Job WIP/Recognition FactBox
9100
Purchase Line FactBox
9106
Customer Ledger Entry FactBox
9107
Resource Statistics FactBox
9108
Resource Details FactBox
9109
Item Warehouse FactBox
9124
Service Line FactBox
9125
Item Application FactBox
9126
Lot Numbers by Bin FactBox
9502
Debugger Callstack FactBox
9503
Debugger Watch Value FactBox



3) NAV crash when user try to open sales order list page

When user try to open sales order list page NAV crash























Error Reason:
 - User has personalization sales order list page which is no more valid after it is modified by developer
- We have modify the sales order list page – added some new field and remove some existing field from page

Solution:
Delete the User Page Personalization (I have delete the user personalization for page 9305)











4) NAV Crash when we try to do choose column function of page









































Error Reason:
There is blank invalid column added in page. When you compile the page than it doesn’t give error but it is crash you try to use choose column function.

Solution:
Remove that invalid line from page





















Please write comment for any query.

I hope it will help you in future.

Thank you

Keep Sharing...Keep Growing...

Thursday, March 24, 2016

Popup window (Input box) in Dynamics NAV RTC Version

Hello Friends,

Sometimes client have a requirement of inputting one or more values at runtime and based on that result perform some actions. So I have implemented an input box that takes multiple values as input at runtime.

Step to create popup window.

1 – Action Enter Rows and Columns












2 – Multiple values Input Box























3 - Result
























Code




Name
DataType
Subtype
Prompt
DotNet
System.Windows.Forms.Form.'System.Windows.Forms, Version=4.0.0.0,
 Culture=neutral, PublicKeyToken=b77a5c561934e089'
FormBorderStyle
DotNet
System.Windows.Forms.FormBorderStyle.'System.Windows.Forms, Version=4.0.0.0,
 Culture=neutral, PublicKeyToken=b77a5c561934e089'
FormStartPosition
DotNet
System.Windows.Forms.FormStartPosition.'System.Windows.Forms, Version=4.0.0.0,
 Culture=neutral, PublicKeyToken=b77a5c561934e089'
LblRows
DotNet
System.Windows.Forms.Label.'System.Windows.Forms, Version=4.0.0.0,
 Culture=neutral, PublicKeyToken=b77a5c561934e089'
LblColumns
DotNet
System.Windows.Forms.Label.'System.Windows.Forms, Version=4.0.0.0,
 Culture=neutral, PublicKeyToken=b77a5c561934e089'
TxtRows
DotNet
System.Windows.Forms.TextBox.'System.Windows.Forms, Version=4.0.0.0,
 Culture=neutral, PublicKeyToken=b77a5c561934e089'
TxtColumns
DotNet
System.Windows.Forms.TextBox.'System.Windows.Forms, Version=4.0.0.0,
 Culture=neutral, PublicKeyToken=b77a5c561934e089'
ButtonOk
DotNet
System.Windows.Forms.Button.'System.Windows.Forms, Version=4.0.0.0,
 Culture=neutral, PublicKeyToken=b77a5c561934e089'
ButtonCancel
DotNet
System.Windows.Forms.Button.'System.Windows.Forms, Version=4.0.0.0,
 Culture=neutral, PublicKeyToken=b77a5c561934e089'
DialogResult
DotNet
System.Windows.Forms.DialogResult.'System.Windows.Forms, Version=4.0.0.0,
 Culture=neutral, PublicKeyToken=b77a5c561934e089'

For all this variables “RunOnCilent” property must be set.
















1 – Create Input Box as Form









2 – Add Labels

















3 – Add Textboxes

















4 – Add Buttons



















5 – Get Results









Done.
Download Objects from here - Click Here

Write the comment if you want more detail.

I hope it will help you some time.

Thank you

Keep Sharing...Keep Growing...

Monday, March 7, 2016

Create super user in NAV 2016 using SQL Query

Following query will use to create new user in NAV 2016 database:

DECLARE @USERSID uniqueidentifier, @WINDOWSSID nvarchar(119), @USERNAME nvarchar(50)
SET @USERNAME   = 'DOMAINNAME\NILESHG'                           /*Domain Name\windowsid*/
SET @USERSID    =  NEWID();
SET @WINDOWSSID = 'S-1-5-21-3002391015-913717614-2845076***-****'   /* USER SID*/


INSERT INTO [dbo].[User]
           ([User Security ID],[User Name],[Full Name],[State],[Expiry Date],
                 [Windows Security ID],[Change Password],[License Type],[Authentication Email],[Contact Email])
    VALUES
          (@USERSID,@USERNAME,'',0,'1753-01-01 00:00:00.000',@WINDOWSSID,0,0,'','')

INSERT INTO [dbo].[User Property]
          ([User Security ID],[Password],[Name Identifier],[Authentication Key],[WebServices Key],[WebServices Key Expiry Date],[Authentication Object ID])
    VALUES
          (@USERSID,'','','','','1753-01-01 00:00:00.000','')

INSERT INTO [dbo].[Access Control]
           ([User Security ID],[Role ID],[Company Name],[Scope],[App ID])
    VALUES
          (@USERSID,'SUPER','',0,'00000000-0000-0000-0000-000000000000')

GO

====================================================================================

Get the SID of current login user by following command:
whoami /user

Get the SID of all domain user by following command:
wmic useraccount get name,sid

Delete - Line Feed (New Line)/ Tab / Special Character from Excel

Dear All,

We have many time face the issue of import (CSV,TAB) file using XMLPort in NAV because of New Line (Carriage Return) /TAB/Special Invisible Character in files.

It is difficult to identify and remove that.

I have search one add-in tool on internet which is help us to remove this invalid character easily.

ASAP Utilities:

Following file has contain the new line character in data and it is giving me error while import using XMLPort.

Step to remove new line character




In the Beyond compare image you can  see that new line character is now removed from file.

It is very easy to do.

Keep sharing...Keep Growing !!!!