Friday, December 26, 2014

Clear All – will not clear the TEMPARORY table on object

Hi All,

CLEARALL – function has reset all flag we have sent on object. But there is one work around to save value on object

Clear All – will not clear the TEMPARORY table on object.

Using the temporary table we pass the our flag value in codeunit even if CLEAR ALL function is used on that.

Example:


In Standard codeunit – 90
  • Set the Temporary Table on codeunit  using the SetWhseRecptHeader function


  • System has write CLEAR ALL function on codeunit On Run trigger. So clear all function will clear all the flag set by any function and all global variable but magic is that clear all will not clear the temporary table variable



















  • In code you can set your flag using the Temporary Table













So now the CLEAR ALL  not the end of thinking…..

Monday, October 6, 2014

Browse folder for Classic and RTC

Hi,

Browse folder in classic version using automation


  • It is look like as below





















  • On Assist edit of trigger write the following code




ExpMgt_lCdu.SelectFolderClassic_gFnc("Export Directory");

  • SelectFolderClassic_gFnc - Function code












IF ISCLEAR(WindowsShell_lAut) THEN
  IF NOT CREATE(WindowsShell_lAut) THEN
    EXIT;

SelectedFolder_lAut := WindowsShell_lAut.BrowseForFolder(0,FolderName_vTxt,1,'');

IF NOT ISCLEAR(SelectedFolder_lAut) THEN BEGIN
  FolderItem_lAut := SelectedFolder_lAut.Self;
  IF FolderItem_lAut.Path <> '' THEN
    FolderName_vTxt := FolderItem_lAut.Path;
END;

  • Pass the parameter by pass by reference 




  • Following variable is created for automation object






Name
DataType
Subtype
Length
WindowsShell_lAut
Automation
'Microsoft Shell Controls And Automation'.Shell

SelectedFolder_lAut
Automation
'Microsoft Shell Controls And Automation'.Folder2

FolderItem_lAut
Automation
'Microsoft Shell Controls And Automation'.FolderItem


Done !!


Browse folder in RTC version using DotNet Variable:


  • It is look like


























  • Call the browse folder function from assite edit trigger on field in page




  • Write the following function
















FolderBrowser_lDnt := FolderBrowser_lDnt.FolderBrowserDialog();
FolderBrowser_lDnt.ShowNewFolderButton := TRUE;
FolderBrowser_lDnt.Description := Text000_gCtx;
FolderBrowser_lDnt.ShowDialog();
IF FolderBrowser_lDnt.SelectedPath <> '' THEN
  FolderName_vTxt := FolderBrowser_lDnt.SelectedPath;


  • Pass the folder path by reference





  • Create the following variable
















Name
DataType
Subtype
FolderBrowser_lDnt
DotNet
'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.System.Windows.Forms.FolderBrowserDialog

  • Create one Text Constant use in above code







Name
ConstValue
Text000_gCtx
Select a Folder...

Done !!

Thursday, October 2, 2014

Indian Localization Manual - RTC Client

Hi,

NAV Manual for following Indian Localization:

STRUCTURE
EXCISE
SERVICE TAX
VALUE ADDED TAX/SALES TAX
TAX DEDUCTION AT SOURCE
TAX COLLECTION AT SOURCE
TDS CERTIFICATE RECEIVABLE FROM CUSTOMER
FIXED ASSETS
PRICE INCLUSIVE OF TAX
MULTI LOCATION NO. SERIES
VOUCHER INTERFACE
GATE ENTRY
STALE CHEQUE
SUBCONTRACTING
LETTER OF CREDIT (LC)


Please download the manual zip file (42 MB) from Microsoft website (go to India SP1):
https://mbs.microsoft.com/partnersource/northamerica/readiness-training/student-training-materials/course80041

Create RTC Service using Powershell and cmd

Hi,

Steps to create RTC service for NAV 2013/ NAV 2013 R2/ NAV 2015
It is very helpful to create different Navision instances for different Build versions:

  • Open power shell by run as administrator and run following command
New-Service -Name 'MicrosoftDynamicsNAVServer$DynamicsNAV71B37221' -BinaryPathName '"C:\Program Files\Microsoft Dynamics NAV\71\ServiceB37221\Microsoft.Dynamics.Nav.Server.exe" $DynamicsNAV71B37221 /config "C:\Program Files\Microsoft Dynamics NAV\71\ServiceB37221\Microsoft.Dynamics.NAV.Server.exe.config"' -DependsOn 'NetTcpPortSharing' -Description 'Service handling DynamicsNAV71B37221' -DisplayName 'Microsoft Dynamics NAV 71 Server[Rollup 9]' -StartupType Manual


























  • Start the following standard portsharing service to use port sharing (if it is not started)
Net.Tcp Port Sharing Service









  • Enable port sharing for new service by using following command in cmd (run as administrator)
sc.exe config MicrosoftDynamicsNAVServer$DynamicsNAV71B37221 depend= HTTP/NetTcpPortSharing


















  • Change the login user in service and set the proper service user



















  • Check the custom setting file and check the database name, server name,service instance name,etc than after start the service
  • Check the event log if any problem in service starting

Tips: to identify the client and server exe by name

1) Client exe always exists in: “Program Files (x86)” folder with name
    C:\Program Files (x86)\Microsoft Dynamics NAV\70\RoleTailored Client\Microsoft.Dynamics.Nav.Client.exe

2) Server exe always exists in: “Program Files” folder with name
    C:\Program Files\Microsoft Dynamics NAV\70\Service\Microsoft.Dynamics.Nav.Server.exe

Client folder is use for – open development environment and RTC Client
Service folder is use for – create the service for that version with build


Tips: Start the port sharing of any service using following command

Start the cmd by run as administrator  
sc.exe config MicrosoftDynamicsNavServer$DynamicsNAV71_B37534 depend= HTTP/NetTcpPortSharing


Tips: Delete the service using command prompt

Start the cmd by run as administrator
Run the following command
sc delete "NILESHGAJJAR-CLASSIC"


--------------------------------------------------------------------------------------------------------------------------


Steps to create RTC service for NAV 2009 / NAV 2009 SP1 / NAV 2009 R2

  • Run cmd by administrator and run the following command
SC CREATE "MicrosoftDynamicsNavServer$Svr3" binpath= "C:\Program Files (x86)\Microsoft Dynamics NAV\60\ServiceNAV2009R2\Microsoft.Dynamics.Nav.Server.exe" start= auto obj= "NT Authority\NetworkService" DisplayName= "Microsoft Dynamics NAV NAV 2009 R2"




















Default Start up RTC Service path in NAV 2009 R2 is like
localhost:7046/DynamicsNAV






Tuesday, September 30, 2014

Sizing guidelines for Microsoft Dynamics NAV 2013 R2

Hi,

Long waiting document finally release by Microsoft on yesterday
We can say Thank you :)  to Microsoft.

​Following whitepapers provides you with guidelines on how to size Microsoft Dynamics NAV 2013
R2 in single-tenant and multi-tenant environments.

Microsoft Dynamics NAV 2013 R2 Sizing Guidelines for On-Premises Single Tenant Deployments

This whitepaper provides guidance on how to size a deployment of Microsoft Dynamics NAV 2013 R2 for single tenant databases when you want to optimize your solution and processes for scale and volume. The load tests used to make these measurements simulated up to 500 concurrent users performing a mixture of tasks at a fixed rate per user / per hour on a single-tenant, single-company Microsoft Dynamics NAV database

Microsoft Dynamics NAV 2013 R2 Sizing Guidelines for Multitenant Deployments.

This whitepaper provides guidance on how to size a multitenant deployment of Microsoft Dynamics NAV 2013 R2 on Windows Azure when you want to optimize your solution and processes for scale and volume. The measurements in this document are based on multitenant deployments with few concurrent users accessing each tenant, with most scenarios below 10 concurrent users per tenant.

Thursday, September 25, 2014

Basic Navision Technical Interview Questions with solutions

1. Tell me about yourself
2. Currently which project you are working on
3. How many versions you know about Navision
4. Do know about v7.0
5. Do know about Web services
6. Do know RDLC Reports
7. What is difference between Nav 4.0 to Nav 2009?
8. Flow field & Flow Filter
9. Sum Index Field Technology(SIFT)
10.Keys and primary keys in a table
11.Single Instance CodeUnit
12.Dimensions
13.Triggers :- Table,Form,Reports,Dataitem
14.Autosplitkey property()
15.Differences between setrange and setfilter?
16.XML ports
17.BLOB : (Binary Large Object)
18.Types of forms
19.Type of Tables
20.Order of execution of report triggers?
21.-2 Tier Architecture
22.-3 Tier Architecture
23.What is a transfooter and transheader
24.Key Groups
25.Delayed Insert property
26.Totalcaused by
27.Totalfields and Createtotal differences
28.DataPerCompany Property:-
29.Sales Flow
30.Purchase Flow
31.Total Caused By
32.Diff b/w Calcfeilds and Calcsum
33.Diff b/w OnAfterGetRecord and OnAfterGetCurrentRecord
34.Forecolor
35.Focusable,Editable,Delete allowed property
36.Print to Excel Functionality
37.What is NAS
38.What is Tenants.
39.What is AutoCalcFields.
40.What is Database Isolation Level.
41.What is Dimension Set ID.
42.What is Single Instance Codeunit.
43. How to manage error handling in Navision.
44. What is adjutant grouping in RDLC Report.
45. ResetPageNumber property of RDLC Report.
46. What is CanGrow in RDLC Report.
47. What is Filtergroup and how many filtergroup is available.
48. Difference between CurrReport.SKIP and Break and Quit.
49. What is use of GUIALLOWED keyword.
50. What is use of CurrFiledNo. keyword.
51. What is extension in NAV 2016.
52. What is the Use of Debug Next?
53. What are new feature added in NAV 2016 Web Client?
54. What is the use of Bricks in NAV 2016?
55. How to Generate Self Sign Certificate for Mobile Client?
56. How many type of Event Available in NAV 2016?
57. Difference between Business Event & Application Event?
58. What are the option available in Sync Objects in NAV 2016?
59. Use of Upgrade Codeunit and Sync Table Setup?
60. What is workflow in NAV 2016?

Find the solution at following link:

https://docs.google.com/file/d/0B0q9VwczZ6C5NGRzcnVSM2FCZVU/edit

https://docs.google.com/file/d/0B0q9VwczZ6C5VGFFZk9rM2twUnc/edit




Thursday, September 11, 2014

Rename Database using SQL Query

Hi,

Use the following SQL Query to rename the database name using management studio.


ALTER DATABASE "old database name" MODIFY NAME = "new database name"


























IF SQL Not allowed to modify database name because it is in use. Than you can update it as following

1.       Set the database to single user only by following query
       ALTER DATABASE "YourDatabaseName" SET SINGLE_USER WITH ROLLBACK IMMEDIATE

2.       Now you able to run database rename query
ALTER DATABASE "old database name" MODIFY NAME = "new database name"

3.       Again set the database to multiple user by using following query
ALTER DATABASE "YourDatabaeName" SET MULTI_USER WITH ROLLBACK IMMEDIATE



Wednesday, September 10, 2014

About the late working in office

Mail sent by Narayan Murthy to all Infosys staff:

It’s half past 8 in the office but the lights are still on… PCs still running, coffee machines still buzzing… And who’s at work? Most of them ??? Take a closer look…

All or most specimens are ?? Something male species of the human race…

Look closer… again all or most of them are bachelors…

And why are they sitting late? Working hard? No way!!! Any guesses??? Let’s ask one of them… Here’s what he says… ‘What’s there 2 do after going home…Here we get to surf, AC, phone, food, coffee that is why I am working late…Importantly no bossssssss!!!!!!!!!!!’

This is the scene in most research centers and software companies and other off-shore offices.

Bachelors ‘Passing-Time’ during late hours in the office just bcoz they say they’ve nothing else to do… Now what r the consequences…

‘Working’ (for the record only) late hours soon becomes part of the institute or company culture.

With bosses more than eager to provide support to those ‘working’ late in the form of taxi vouchers, food vouchers and of course good feedback, (oh, he’s a hard worker….. goes home only to change..!!). They aren’t helping things too…

To hell with bosses who don’t understand the difference between ‘sitting’ late and ‘working’ late!!!

Very soon, the boss start expecting all employees to put in extra working hours.

So, My dear Bachelors let me tell you, life changes when u get married and start having a family… office is no longer a priority, family is… and That’s when the problem starts… b’coz u start having commitments at home too.

For your boss, the earlier ‘hardworking’ guy suddenly seems to become a ‘early leaver’ even if u leave an hour after regular time… after doing the same amount of work.

People leaving on time after doing their tasks for the day are labelled as work-shirkers…

Girls who thankfully always (its changing nowadays… though) leave on time are labelled as ‘not up to it’. All the while, the bachelors pat their own backs and carry on ‘working’ not realizing that they r spoiling the work culture at their own place and never realize that they would have to regret at one point of time.

So what’s the moral of the story??
* Very clear, LEAVE ON TIME!!!
* Never put in extra time ‘ unless really needed ‘
* Don’t stay back unnecessarily and spoil your company work culture which will in turn cause inconvenience to you and your colleagues.

There are hundred other things to do in the evening..

Learn music…..

Learn a foreign language…

Try a sport… TT, cricket………..

Importantly,get a girl friend or boy friend, take him/her around town…

* And for heaven’s sake, net cafe rates have dropped to an all-time low (plus, no fire-walls) and try cooking for a change.

Take a tip from the Smirnoff ad: *’Life’s calling, where are you??’*

Please pass on this message to all those colleagues and please do it before leaving time, don’t stay back till midnight to forward this!!!

IT’S A TYPICAL INDIAN MENTALITY THAT WORKING FOR LONG HOURS MEANS VERY HARD WORKING & 100% COMMITMENT ETC.

PEOPLE WHO REGULARLY SIT LATE IN THE OFFICE DON’T KNOW TO MANAGE THEIR TIME. SIMPLE !

Regards, NARAYAN MURTHY.

Share this Story with your Friends If you Agree.

Nilesh Gajjar - but i am completly disagree with this story. because the hardworking is the only way know new thing and get success in life. other loser are not want to be grow him self so they are leave office in time but winner always put their extra effort to win the game and be the smart in world.

Implicit conversion from data type datetime to decimal is not allowed.Use the CONVERT function to run this query.

Hi,

When you apply the date filter in chart of account page you have got the following error


























Solution

Remove the flowfield from page: "Add.-Currency Balance at Date"

it is work now. This was the stndard bug in NAV 2013 base build may be it is solved in new build.

Tuesday, September 9, 2014

Create the windows login in NAV using SQL Query

Hi,

Use the following query to create the windows user in NAV Database using sql query.
Open the SQL Management Studio and run the following query on your relevant database.

D365BC 22 - OnPrime

DECLARE @USERSID uniqueidentifier, @WINDOWSSID nvarchar(119), @USERNAME nvarchar(50)
SET @USERNAME   = 'intech-systems\navadmin'                           /*Domain Name\windowsid*/
SET @USERSID    =  NEWID();
SET @WINDOWSSID = 'S-1-5-21-755842481-2054525155-1331847812-1213'   /* 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],[Exchange Identifier],[Application ID])
    VALUES
          (@USERSID,@USERNAME,'',0,'1753-01-01 00:00:00.000',@WINDOWSSID,0,0,'','','','00000000-0000-0000-0000-000000000000')

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

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

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


D365BC
DECLARE @USERSID uniqueidentifier, @WINDOWSSID nvarchar(119), @USERNAME nvarchar(50)
SET @USERNAME   = 'INTECHSYSTEMS\NILESHG'                           /*Domain Name\windowsid*/
SET @USERSID    =  NEWID();
SET @WINDOWSSID = 'S-1-5-21-3002391015-913717614-2845076344-1997'   /* 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],[Exchange Identifier],[Application ID])
    VALUES
          (@USERSID,@USERNAME,'',0,'1753-01-01 00:00:00.000',@WINDOWSSID,0,0,'','','','00000000-0000-0000-0000-000000000000')

INSERT INTO [dbo].[User Property]
          ([User Security ID],[Password],[Name Identifier],[Authentication Key],[WebServices Key],[WebServices Key Expiry Date],[Authentication Object ID],[Directory Role 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

 ==================
NAV 2016

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

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

NAV 2015

DECLARE @USERSID uniqueidentifier, @WINDOWSSID nvarchar(119), @USERNAME nvarchar(50)
SET @USERNAME   = 'DOMAIN\NILESHG'    /*Domain Name\windowsid*/
SET @USERSID    =  NEWID();
SET @WINDOWSSID = 'S-1-5-21-3002391015-913717614-2845076344-1997'   /* 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])
    VALUES
          (@USERSID,@USERNAME,'',0,'1753-01-01 00:00:00.000',@WINDOWSSID,0,0,'nileshg@domain.com')

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])
    VALUES
          (@USERSID,'SUPER','')

GO

----------------------------------------------------

NAV 2013 R2

DECLARE @USERSID uniqueidentifier, @WINDOWSSID nvarchar(119), @USERNAME nvarchar(50)
SET @USERNAME   = 'DOMAIN\NILESHG'    /*Domain Name\windowsid*/
SET @USERSID    =  NEWID();
SET @WINDOWSSID = 'S-1-5-21-3002391015-913717614-2845076344-1997'   /* 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])
    VALUES
          (@USERSID,@USERNAME,'',0,'1753-01-01 00:00:00.000',@WINDOWSSID,0,0,'nileshg@domain.com')

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])
    VALUES
          (@USERSID,'SUPER','')

GO

----------------------------------------------------

NAV 2013

DECLARE @USERSID uniqueidentifier, @WINDOWSSID nvarchar(119), @USERNAME nvarchar(50)
SET @USERNAME   = 'DOMAIN\NILESHG'      /*Domain Name\windowsid*/
SET @USERSID    = NEWID();
SET @WINDOWSSID = 'S-1-5-21-3002391015-913717614-2845076344-1997'    /* User SID */
INSERT INTO [dbo].[User]
          ([User Security ID],[User Name],[Full Name],[State],[Expiry Date],
           [Windows Security ID],[Change Password],[License Type])
    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])
    VALUES
          (@USERSID,'','','','','1753-01-01 00:00:00.000')
INSERT INTO [dbo].[Access Control]
          ([User Security ID],[Role ID],[Company Name])
    VALUES
          (@USERSID,'SUPER','')
GO

----------------------------------------------------

NAV2009/NAV 2009 R2

INSERT INTO [dbo].[Windows Login]
           ([SID])
     VALUES
           ('S-1-5-21-3002391015-913717614-2845076344-1997') *Domain Name\windowsid*/
GO
INSERT INTO [dbo].[Windows Access Control]
           ([Login SID]
           ,[Role ID]
           ,[Company Name])
     VALUES
           ('S-1-5-21-3002391015-913717614-2845076344-1997',
            'SUPER',
            '')
GO

----------------------------------------------------

Get the SID of any user in domain by following command write in cmd

wmic useraccount get name,sid























OR

Only get current login user name and SID detail by following command

whoami /user