Quantcast
Channel: Saurav Dhyani - #MSDynNAV & #MSDyn365bc
Viewing all 1145 articles
Browse latest View live

NAV 2013 Study Material Released..

$
0
0

NAV 2013 Report Header Doesn't get Printed.

$
0
0
Hi all,

During working on NAV 2013 Report, i faced an issue. The issue was weird so i thought sharing same with all of you.

I created a report with all the same techniques that we used to use till NAV 2009 R2. Everything was fine and was previewing fine.

Just for your information while creating Report Header and Footer i used GetData and SetData as we used till now.

The preview was great, then i thought to print report in Printer/Excel/Word/PDF Format.

But to my surprise the report header and footer was Blank in all the above mentioned formats.

I was looking for solution for next 4 hours but was unable to find same, then i look in standard report and tried to find difference in SETDATA and GETDATA in NAV 2013 than NAV 2009.

Finally i was able ti find resolution.

PROBLEM -

Report Header is not getting printed while trying to print report in Printer / Excel / Word and PDF Format.

RESOLUTION -

1) Design Report 407.
2) Open Layout.
3) In the Header open the textbox property top left box.
4) You will find nothing under Value in General Tab.
5) Now navigate to Visibility Tab and you will find an expression.
6) Open the expression and you will find Code.SetData there.
7) Do these changes in your Report and it should work, Put the expression in visibility instead of value.

* worked for me, should work for you. :)

Follow the steps as shown below for SETDATA.



Regards,
Saurav Dhyani
http://saurav-nav.blogspot.com/

You are not authorized to sign in. Verify that you are using valid credentials and that you have been setup as a user in Microsoft Dynamics NAV.

$
0
0
Hi all,

while creating a database in NAV 2013 or during upgrade we sometime forget to add our own windows login into the database.

Result of same is that we are unable to access the database anymore.

Till NAV 2009 R2 we used to add the login from the Native Client but with NAV 2013 user creation have also being moved to RTC Client.

So it was a tedious task to repeat activities again :(.


But today Waldo have posted a blog which will enable us to add the users into NAV 2013 Database where we are not authorized to sign in.

You can read the Blog entry here.

I take this opportunity to thank Mr. Waldo from my side and on behalf of all readers. You really Saved our effort.


Regards,
Saurav Dhyani
http://saurav-nav.blogspot.com/

NAV 2013 Upgrade Part III - Data Upgrading.

$
0
0
Hi all,

As per agenda we need to discuss the data upgrade in NAV 2013. The process is similar to what used to be till NAV 2009 R2 but with some changes.

Let's start the process.

Remember - 
1) You can only upgrade a database to NAV 2013 from NAV 2009 SP1 / R2 SQL Only.
2) The Synchronization of users with SQL Server is no more required.

Steps -
1) Update the Application Code (Already Discussed in Part 1& Part 2).

2) Export all the objects from new customized Microsoft Dynamics NAV 2013 database to an object file: MergedObjectNAV2013.fob.

3) Prepare for the data conversion.
  a. Make sure that you are the only user connected to the database.
  b. Back up the database and save the backup file in a safe place.
  c. Make a copy of the customer’s database in SQL Server Management Studio. You will upgrade the
      copy and keep the original.
  d. Verify that both your partner development license file and customer license file have been updated to
      Microsoft Dynamics NAV 2013.
  e. Identify a User ID and password for a superuser in the system or create a new superuser that you can
      use for the upgrade process. Log in as the superuser when you perform the upgrade.
  f. Verify that you have the dbcreator and securityadmin Server Roles for the Microsoft Dynamics
      NAV SQL Server instance, using SQL Server Management Studio. To manage companies, objects,
      and licenses within a Microsoft Dynamics NAV database you must also have the db_owner database
     permission.
  g. Disable integration properties for the database.
  h. Open the database in the Microsoft Dynamics NAV 2009 Classic with Microsoft SQL Server client.
  i. Run a database test to determine the state of the customer’s database.

Note: The database test can require a significant amount of time, depending on the size of the database.

4) Import Upgrade601700.1.fob. (This can be found in Product DVD under Upgrade Toolkit -->Data
    Conversion Tools\601)

5) Perform Step 1 data conversion. (IN OLD VERSION 2009 SP1 / R2)

a. In the Classic client, open Object Designer, and then open form 104001, Upgrade - Old Version.
b. Choose Run.
c. Choose Transfer Data.
Repeat the conversion for each company in the database.

6) On form 104001, choose Delete Objects.

7) Create the New Microsoft Dynamics NAV Database.
This involves installing Microsoft Dynamics NAV 2013, and then opening your database in the Microsoft Dynamics NAV 2013 development environment.

8) Change the compatibility level of the database to 100 in SQL Server.


OR The Command
USE [master]; ALTER DATABASE [YourDatabaseName] SET COMPATIBILITY_LEVEL = 100

9) Import all customized Microsoft Dynamics NAV 2013 objects. (MergedObjectNAV2013.fob.)
10) Compile all objects.
11) Import Upgrade601700.2.fob.(This can be found in Product DVD under Upgrade Toolkit -->Data Conversion Tools\601)

[Step 2 To be performed in NAV 2013]

12)Perform Step 2 data conversion.
  a.Open page 104002, Upgrade - New Version.
  b.Choose Run.
This opens the Windows client and displays page 104002, Upgrade - New Version.
  c.Choose Transfer Data.
  d. Run Page 257 Source Codes.
  e. Initialize all companies (run codeunit 2).

13.Upgrade Roles (Permission Sets) and Permissions.

14.Delete obsolete tables.
  a.Open Object Designer
  b.Open form 104002.
  c.Run Upgrade - New Version.
  d.Choose Delete, and then choose Mark Unused Old Tables.
  e.Set a filter on the Version List column to select tables marked as “Old Unused Table - marked for
      deletion.”
  f.On the Edit menu, choose Delete to delete the tables.

15.Delete Upgrade Toolkit Objects
  a.In form 104002, choose Delete, and then choose Mark/Delete Upgrade Toolkit.
  b.All Upgrade Toolkit objects, except tables, are removed automatically. The tables are marked for
     deletion.
  c.Set a filter on the Version List column to select tables marked as “Upgrade Toolkit Tables - marked for
      deletion.”
  d.On the Edit menu, choose Delete to delete the tables.

Let me know if you face any issues.

Regards,
Saurav Dhyani
http://saurav-nav.blogspot.in/

NAV 2013 Upgrade Part IV - SQL Migration.

$
0
0

Hi all,

While Release of NAV 2013, we had some new things but some old things became obsolete and cannot be used with this version of Navision.

One of them that effect most of the customer is Support to NATIVE Database. So today we will discuss about Native to SQL Migration which is one of the steps during upgrade to NAV 2013.

Let's See why we cannot restore a backup of Native Database into SQL Server Database.

For Demo Purpose i have taken a demo database and intentionally created some issues which normally occurs during SQL Migration.

So i have NAV 2009 SP1 Native DB with Errors. I took NAV backup and trying to restore same on SQL Server NAV 2009 SP1 Database.

Here is the error message that i get -

The Cust. Ledger Entry table contains a field with a date value that cannot be used with SQL Server:
Record: Entry No.='1820'
Field: Posting Date='01-01-0101' (WHICH I CHANGED intentionally)



Reason -
SQL Date Starts From 01-01-1754.

*There are other errors too during restoring Native Backup to SQL.

Resolution-

We will follow the procedure given by Microsoft.

For this you will require Product DVD & Developer Licensce.

1) Navigate to Upgrade Toolkit ->SQL Migration in Product DVD.

2) you will find Migrate.fob.

3) Import Migrate.fob in Native Database(10 objects will be imported).

4) Run Codeunit 104010 Create Field Checking Code (This will create a text file in C Drive named as FIELDCHK.TXT.

5) If you are using windows 7 and the codeunit gives you an error message saying - "The operating system cannot access to the file C:\FIELDCHK.TXT .Verify that the file type and attributes are correct".

Then design the codeunit and onRun Trigger change the Path of the File Name to some other drive.

6) A message will popup which confirm that file is created.

7) Import the txt file into the database. (you require Developer Licensce to do that).

8) After importing compile Codeunit 104015 Field Check. After compilation Run Codeunit 104015 Field Check.

9) This process will take time as per the size of your database and no. of companies in your database.

10) The will will keep you updated about number of errors that have been found yet.


11) Once completed it will display a message with count of total number of errors.

12) Once clicked OK a form will get open which will contain the incorrect value and suggested values from tool.


13) You can change the New value as per discussion with client.

14) After doing all rectification just click ESC and the message will confirm that you want to update the new values in tables.

15) Delete all records from table 104010 Incorrect Data Value & 104011 Code Field Information FROM ALL COMPANIES.

16) If selected yes the new values will be applied.

17) After completion mark Codeunit 104015 and then filter based on version @*MIG* and mark all listed records.

18) Remove the filter and select all marked objects.

19) Delete all objects(Total object count should be 10).

20) Take Navision backup and restore on SQL Server Database.

Regards,
Saurav Dhyani
http://saurav-nav.blogspot.in/

NAV 2013 Credential Type - How to Use?

$
0
0


Hi all,

Please do these activities when you have time, its a long activity and i would suggest do all activities in one go. So be clam and lets start.

I have installed NAV 2013 and its work great with my windows credentials.



I was checking the service console (Microsoft Dynamics NAV Administration) in NAV 2013 and found out that Credentials Type have multiple Options.

1) Windows (we use this as default and its works fine when we install default NAV 2013. We are using same after release of NAV 2009).

Other Options are - UserName, NavUserPassword and AccessControlService.

First of create a user under Administration/IT Administration/General/Users. As shown below how to create it.


I use UserName as TEST and Password as Manager@1. Provide Super Role to the Test User.

You will encounter with an error message when you try to save the Login as shown below.


Just click ok, we are getting this error because we haven't changed the service file yet.


Let's try to use the second option that is NavUserPassword in this article. All steps remain same for UserName too.

First of all i will change the Credentials Type in Service Console of NAV 2013 by editing the service as shown below.



After that try to stop and start the service. You will encounter with an error message -

Server Instance 'MicrosoftDynamicsNavServer$DynamicsNAV70' failed to reach  status 'Running' on this server due to the following error: 'Time out has expired and the operation has not been completed.'. Additional information may be in the event log of the server.



I checked the event viewer and here is what the detailed error i got -

Server instance: DynamicsNAV70
Session type: UnknownClient
Session ID: 0
User: 
Type: Microsoft.Dynamics.Nav.Types.NavConfigurationException
SuppressMessage: False
FatalityScope: None
Message: The required certificate thumbprint is not specified. Specify a valid value for the ClientServicesCertificateThumbprint configuration setting.
StackTrace:
     at Microsoft.Dynamics.Nav.Types.CertificateValidator.ValidateCertificateThumbprint(String thumbprint)
     at Microsoft.Dynamics.Nav.Types.CertificateHelper.GetCertificateFromThumbprint(String certificateThumbprint)
     at Microsoft.Dynamics.Nav.WindowsServices.NavServerWindowsService.CreateServiceHosts(ServerUserSettings settings, Boolean usePortSharing, String machineName)
     at Microsoft.Dynamics.Nav.WindowsServices.NavServerWindowsService.OnStart(String[] args)
Source: Microsoft.Dynamics.Nav.Types
HResult: -2146233088

It says that we need to specify ClientServicesCertificateThumbprint in the Service. Lets try to find where we need to specify it. I opened the service console and under client service i can see the Certificate thumbprint as shown below.



Let try to specify a value for the same.

Prerequisites -
1. Microsoft Management Console (MMC).
2. The makecert.exe utility.

If you do not already have this (MMC) snap-in installed, then follow these steps:
1. Choose Start, choose Run, and then type Mmc.exe.
2. In the console, on the File menu, choose Add/Remove Snap-in.
3. In the Add Standalone Snap-in dialog box, select Certificates, choose Computer Account, choose Local Computer, and then choose Add.



The makecert.exe utility is installed with Microsoft Visual Studio and Microsoft Windows SDK.

To create a root CA and a private key file by using the makecert.exe utility.

1. On the computer running Microsoft Dynamics NAV Server, create a temporary folder to use when you work with certificates.
2. Open the command prompt as follows:

If you have Visual Studio installed on your computer, choose Start, choose All Programs, choose Microsoft Visual Studio 2010, choose Visual Studio Tools, and then right-click Visual Studio Command Prompt and choose Run as Administrator.



3. Type the following command.
makecert -n "CN=RootNavServiceCA" -r -sv RootNavServiceCA.pvk RootNavServiceCA.cer

When you are prompted, enter a password. You need this password to create the service certificate.

The RootNavServiceCA.cer certificate file and the RootNavServiceCA.pvk private key are saved in your temporary folder.

To use the Certificates snap-in to install the root CA on the computer running Microsoft Dynamics NAV Server -

1. Start the Certificates snap-in for MMC on the computer running Microsoft Dynamics NAV Server, and then add the Certificates snap-in. [Already Done]

2. In the Certificates snap-in dialog box, choose Computer account, and then choose Next.[Already Done]

3. In the Select Computer pane, choose Local computer: (the computer this console is running on), and then choose Finish. [Already Done]

4. Choose OK to close the Add or Remove Snap-ins dialog box. [Already Done]

5. In the left pane of MMC, expand the Certificates (Local Computer) node.

6. Expand the Trusted Root Certification Authorities node, right-click the Certificates subfolder, select All Tasks, and then choose Import.

7. In the Certificate Import Wizard, on the Welcome page, choose Next.

8. On the File to Import page, choose Browse.

9. Browse to the location of the RootNavServiceCA.cer certificate file, select the file, and then choose Open.

The default Location is C:\Windows\SysWOW64\RootNavServiceCA.cer.



10. On the File to Import page, choose Next.

11. On the Certificate Store page, accept the default selection, and then choose Next.

12. On the Completing the Certificate Import Wizard page, choose Finish.

13. The RootNavServiceCA certificate is now visible in the list of trusted root CAs.

14. You now create a certificate revocation list for the root certification authority and then install the certificate revocation list on the computer running Microsoft Dynamics NAV Server. A certificate revocation list is required because WCF applications check the revocation list when validating certificates.

To create a certificate revocation list for the root certification authority

At the command prompt, type the following command: (use same Visual Studio Command Prompt)
makecert -crl -n "CN=RootNavServiceCA" -r -sv RootNavServiceCA.pvk RootNavServiceCA.crl

When you are prompted, enter the password that you used to create the certificate.

To install the certificate revocation list on the computer running Microsoft Dynamics NAV Server -

1. In the Certificates snap-in, in the left pane of MMC, expand the Certificates (Local Computer) node.

2. Expand the Trusted Root Certification Authorities node, right-click the Certificates subfolder, select All Tasks, and then choose Import.

3. In the Certificate Import Wizard, on the Welcome page, choose Next.

4. On the File to Import page, choose Browse.

5. In the File Type field, select Certificate Revocation List (*.crl).

6. Browse to the location of the RootNavServiceCA.crl file, select the file, and then choose Open.



7. On the File to Import page, choose Next.

8. On the Certificate Store page, accept the default selection, and then choose Next.

9. On the Completing the Certificate Import Wizard page, choose Finish.

10. Select the Trusted Root Certificate Authorities node, and then refresh the snap-in.

A Certificate Revocation List folder that contains the RootNavServiceCA.crl file has been created.



To create and install a test certificate for the Microsoft Dynamics NAV Server computer -

1. At the command prompt, type the following command:

makecert -sk NavServiceCert -iv RootNavServiceCA.pvk -n "CN=NavServiceCert" -ic RootNavServiceCA.cer -sr localmachine -ss my -sky exchange -pe NavServiceCert.cer

This command specifies the subject’s certificate name as NavServiceCert. You need this certificate name when you configure the Microsoft Dynamics NAV Windows client or Microsoft Dynamics NAV Web Server components.

2. When you are prompted, enter the password that you used to create the root CA.

3. Select the Trusted Root Certificate Authorities node, and then refresh the snap-in.

To grant access to the certificate’s private key to the service account for Microsoft Dynamics NAV Server -

1. In the left pane of MMC, expand the Certificates (Local Computer) node, expand the Personal node, and then select the Certificates subfolder.

2. In the right pane, right-click the NavServiceCert certificate, choose All Tasks, and then choose Manage Private Keys.

3. In the Permissions for NavServiceCert private keys dialog box, choose Add.

In the Select Users, Computers, Service Accounts, or Groups dialog box, enter the name of the service account that is used by Microsoft Dynamics NAV Server By default, the service account is NETWORK SERVICE. Choose OK when done.


In the Permissions for NavServiceCert private keys dialog box, select the account, and then select the Allow check box next to Full Control. Choose OK when done.

In the right pane, double-click the NavServiceCert certificate.

In the Certificate dialog box, choose the Details tab, and then select the Thumbprint field.

Copy or note the value of the Thumbprint field. (Make Sure you only copy the value as the Thumbprint value have a space in the start as shown in image below)


Paste the value in service as shown below.


Start the service and walla service started succesfully.

Now let's try opening Role Tailored Client (Windows Client).

What the Hell we are getting an error saying - There is a communication protocol mismatch between the client and the server.



And the worst part is that there is nothing on the Event viewer also.

Oh! i missed one more configuration file that reside under users in c. Let's stop the service and open the ClientUserSettings file.

The path for file is - C:\Users\<user name>\AppData\Roaming\Microsoft\Microsoft Dynamics NAV\70

When i opened the file, i figured out that ClientServicesCredentialType is still windows. Lets try to change it to NavUserPassword.


Save the file, start the service and start the client.

Wow the RTC Client Connected and its asking for user name and password.



When i entered username and password, clicked ok. But what i am getting an error.



The error message also suggest the solution.It says we need to put the Certificate Name in DNSIDENTITY.

so where is it? It in the ClientUserSetting, open the file and enter the certificate name in the DNSIdentity Value as shown below.



Now lets start the client and its started successfully as shown below.



Put comments if you like this post or you have any issues.

Regards,
Saurav Dhyani
http://saurav-nav.blogspot.in/

Add Image in RTC Reports?

$
0
0
Hi all,

I think i got late with this post, but i was unaware that most of us still don't know how to add reports in Role Tailored Client Reports.

So let's have a look on the same. For the demo purpose i will use standard report with ID 111.

Steps -
1) Design the Report.
2) Add a new global variable of company information in CAL Global say companyinfo as shown below.

3) Now we will get companyinfo in onPreReport Trigger and compute value of picture as its a blob field.
   Companyinfo.GET;
   Companyinfo.Calcfields(Picture).

* Add above lines in onPreReport Trigger.

4) Now we should add a Picture Box on the Sections with SourceExpr CompanyInfo.Picture.
We need to do this to have the dataset field name to be available for us in Visual Studio.


5) Let's open report layout by Tools - View Layout.
6) You will find a new entry in Dataset as shown below.


7) Now lets add this to the report.
   a) We need to add the Company Picture first as a TextBox to the body of the report.
       This will enable us to use it in the Page Header. We add this TextBox in top of the Body.


   b) We give the TextBox the following properties:
      Value: “=Convert.ToBase64String(Fields!CompanyInfo_Picture.Value)”
      Name: “CompanyPicture”
      Visibility Hidden:“True”
      Color: “Red”


8) As we all know that for anything in header we need to add code in report properties, code tab. So lets now add code there. Below is the function that will be required.

Shared PictureData as Object

Public Function GetPicture() as Object 
  Return PictureData 
End Function

Public Function SetPicture(NewData as Object) 
  if NewData>"" 
    PictureData = NewData 
end if 
End Function



9) Now let us add the Image control just as we did for the embedded scenario. Open the Toolbox and add a Image control to the Report.

10) Here are the properties that we need to set for this image control -
     Value:“=Convert.FromBase64String(Code.GetPicture())”  
     Source:“Database” 
     MIMEType: “image/bmp”

11) Add textbox to Page Header. 
Note! This textbox has to be placed above the Picture control just added
  Value:“=Code.SetPicture(ReportItems!CompanyPicture.Value)” 
  Visibility Hidden: “True” 
  Color:“Red


12) Save and import RDLC changes, and then compile report in Classic client. 

13) Run the Report from RTC Client and here is the expected output.



* Keep reading, commenting and suggesting on which topic you require post.


Thanks & Regards,
Saurav Dhyani
http://saurav-nav.blogspot.in/

The Breakpoint Already Exist...

$
0
0

Hi all,

Just a quick post.

Most of time we get a error message "The BreakPoint Already Exist" Error Message in Navision.

The Error message is due to - "During testing the process by Technical Consultant we put breakpoints to test the value at that particular instance.

One of my user reported this error which he was getting during execution of Job in Event Viewer.

So now how can i remove all the breakpoints that i have applied, as i might have applied into multiple objects into multiple places.

Resolution ( How to remove all breakpoints in one go) -

1) open Object Designer.
2) Create a new form.
3) Use Table Breakpoint as source table and Form Type Tabular.


4) Select all fields and select Preview.
5) You will be able to see all breakpoints that you have applied as shown below.

6) Just delete all the contents of this form and restart the NAV Clients.

7) All Breakpoints have been removed.

Keep reading,commenting and suggesting about new posts.

Regards,
Saurav Dhyani
http://saurav-nav.blogspot.in/

Port Sharing in NAV 2013

$
0
0
Hi all,

After installing NAV 2013, the Port 7046 is blocked for NAV 2013 Management services.

Earlier till NAV 2009 R2 we can create services for NAV 2009 and NAV 2009 SP1 on the same port by enabling TCP Port Sharing service.

But when we try same after installing NAV 2013 it gives an error.

Reason -

The service created by NAV 2013 is not configured for Port Sharing. I mean it does not depends on Port Sharing service.

Resolution -

A breif explanation will be configuring the NAV 2013 deafult service and enabling dependency on NetPortSharing service. This will enable the Port sharing for Port 7046.

The command will be -
sc config ServiceName depend =NetTcpPortSharing/HTTP

where the Service Name - can be seen from the services.msc console.

The detailed article for the same can be found at Waldo's Blog.

Thanks Man :).

Regards,
Saurav Dhyani
http://saurav-nav.blogspot.in/

NAV 2013, NAV 2009 R2, NAV 2009 SP1 & NAV 2009 on Same Machine with Same Ports

$
0
0

Hi all,

As discussed in my most of the Earlier post when we install NAV 2013, it is the best practice to Uninstall all
previous version that are installed.

Reason - When we install multiple versions of Navision after 2009 and try to run the object from the object designer it gives us an error message.

Today we will be discussing the extended part of the Posts -
1) NAV 2009 SP1 and R2 on Same Machine
2) NAV 2009 SP1 & R2 on same machine with Issue Resolution

As new version of NAV, i.e NAV 2013 have been released so we need to change some of the setting.

First of all, i will delete all the services that i have created for Post 1 and 2 by using below command -

1) Run Command Prompt as administrator.
2) Run The command sc Delete <ServiceName>
Service name can be found in services.msc.

Now i will un-install the NAV 2009 R2 Version from my Computer.

Steps to configure the NAV 2013 and other version on same machine-

1) Install NAV 2013 on your machine, I installed the Demo Version of Product.
2) The components get installed in  c:\Program Files\Microsoft Dynamics NAV\70.

3) After successful Installation i created a new folder Named 60_OLD in c:\Program Files\Microsoft Dynamics NAV\ Directory.

4) I Copied the RTC and Service Files and ClientUserSettings Files of NAV 2009, NAV 2009 SP1 & NAV 2009 R2 inside New Folder as shown below.



 * If you don't know how to create ClientUserSetttingsFile Please read the post 2.

5) Now the Default Service that Comes with NAV 2013 have not set to have port sharing and if we want to use the only port that is 7046 we need to enable it.

6) Open the command prompt as administrator and extract the service name from services.msc as shown below.


7) Run the following command as shown above.

sc config MicrosoftDynamicsNavServer$DynamicsNAV70 depend= NetTcpPortSharing/HTTP

* This command will add dependency of Port Sharing on the New service created.

8) Now we will create the service for NAV 2009, SP1 & R2, we will use the same port 7046 for all the services.
(If you are following all the steps as listed above then please read ahead otherwise in the command change the binpath as the path of the folder where you kept the RTC and Service Folder)

9) Here is the command to create a service for NAV 2009.

SC CREATE MicrosoftDynamicsNavServer2009 binpath= "C:\Program Files (x86)\Microsoft Dynamics NAV\60_OLD\NAV 6.0 IN\Service\Microsoft.Dynamics.Nav.Server.exe" start= auto obj= "NT Authority\NetworkService" type= own depend= NetTcpPortSharing

10) Here is the command to create a service for NAV 2009 SP1.

SC CREATE MicrosoftDynamicsNavServer2009SP1 binpath= "C:\Program Files (x86)\Microsoft Dynamics NAV\60_OLD\NAV 6.0 SP1 IN\Service\Microsoft.Dynamics.Nav.Server.exe" start= auto obj= "NT Authority\NetworkService" type= own depend= NetTcpPortSharing

11) Here is the command to create a service for NAV 2009 R2.

SC CREATE MicrosoftDynamicsNavServer2009R2 binpath= "C:\Program Files (x86)\Microsoft Dynamics NAV\60_OLD\NAV 6.0 R2 IN\Service\Microsoft.Dynamics.Nav.Server.exe" start= auto obj= "NT Authority\NetworkService" type= own depend= NetTcpPortSharing 



12) Now we need to start the Service NetTcpPortSharing as all the service created above depends on this service. You can find the service in Services.msc.

13) As in NAV 2013 Xp_Ndo.dll Concept has been removed but we need it for our older version. So for adding Xp_Ndo please refer  Post 1 Xp_Ndo& Post 2 Xp_Ndo.

14) Now lets change the config file of the Service i.e Custom Settings. (Remember while doing this you need to run Notepad as administrator)

15) As shown below -
    I have three database for 2009, SP1 and R2.
    I have Used the same ports 7046 For all services.
    But i have changed the Service instance  
            DynamicsNAV2009,DynamicsNAV2009SP1,DynamicsNAV2009R2 Respectively.



16) Once done the part is left to change the ClientUserSettings Files so that we don't get a Startup Error.

17) As shown below i have changed the config files too with proper instance and port.


* if you don't know how to create it refer to post.

18) Now i will create shortcuts of NAV 2009, SP1, R2 & 2013 in Desktop. For 2009, SP1 & R2 i will create shortcuts from the same location where i copied them in my case for 2009 it is- C:\Program Files (x86)\Microsoft Dynamics NAV\60_OLD\NAV 6.0 IN\RoleTailored Client.



19) Now the part left is just to map the clientusersetting files with these shortcuts.

20) In the end of target line of the shortcut properties i just appended these strings -

For 2009
-settings:"C:\Program Files (x86)\Microsoft Dynamics NAV\60_OLD\NAV 6.0 IN\ClientUserSettings2009.config"

For 2009 SP1
-settings:"C:\Program Files (x86)\Microsoft Dynamics NAV\60_OLD\NAV 6.0 SP1 IN\ClientUserSettings2009SP1.config"

For 2009 R2
-settings:"C:\Program Files (x86)\Microsoft Dynamics NAV\60_OLD\NAV 6.0 R2 IN\ClientUserSettings2009R2.config"

19) Start the services will proper credentials in Logon Tab.

20) Click on all the icons in desktop and yeah we have all RTC versions working on same port in same machine as shown below.



* Remember after following all these steps you will not Run Objects from Object Designer for NAV 2009, SP1 and R2.

Let me know if anyone face any issues, or how you like this post.

Waiting for your feedback.

Thanks & Regards,
Saurav Dhyani
http://saurav-nav.blogspot.in/

NAV 2009 Reports - Common Issue & Resolutions..

$
0
0
Hi all,

I know it to late but I wish you all a very Happy  & Prosperous New Year. I am so much busy these days that i can't even make a Blog entry.

So here is the list of points that i will be coming up in next few days (once i will get free) -

As most of us still working on NAV 2009 Reports. Let's figure out the challenges we face during development of RTC Reports.

1) Report Header in First Page Only?
2) Report Header in All Pages?
3) Report Footer in Last Page Only?
4) Report Footer in All Pages?
5) Report Footer in Last Page Bottom Only?
6) Resetting page number while running report for multiple records?

I will be posting entries for all these points, if anyone have any other doubts about RTC Reportplease add it as comment on this article. I will try to figure out the solution for same and will append the above list.

Let's try to work to RTC reports as easy as it used to be in Classic Version.

Regards,
Saurav Dhyani
http://saurav-nav.blogspot.in/

Freeze Pane in NAV 2013

$
0
0
Hi all,

It's been so long from my last post. Sorry but i am busy these days.

Let's have a quick post about the new Freeze Pane that is available in NAV 2013 List Pages and how we can change that freeze pane.

What is freeze Pane?
Freeze Pane means the selected Columns remain fix when you navigate in the page records.

Here is a image of purchase order how freeze pane look like.


In Standard Page it comes after Buy From Vendor Name.

Let's see how user can configure it as per his/ her needs. Open the menu and select customize, customize this page.


Then select Choose column from the menu. In the right hand side you will see add freeze pane. select the position where you want to add the freeze pane as shown below.


Click ok and see the page how it look like now.


The entry for same can be found in Table 2000000075 User Metadata as shown below.


I know most of you know this, but just felt sharing the info :).

Regards,
Saurav Dhyani
http://saurav-nav.blogspot.com/

How to Configure Database Mail in SQL Server.

$
0
0

Hi all,

Let's see how to configure Database Mail in SQL Server. we will see use of same in future post.

Open SQL Server Management Studio.

Open Management and Right Click Database Mail as shown below.


Select Configure Database Mail.

Click Next on the welcome Message Screen.

Select Setup Database Mail by Performing the following task.



Click Next and Specify the Profile Name and description. Once done click on Add Button Under SMTP accounts, as shown below.


Enter Details of Mail Account. Here you need to specify the Email Address & Name of the sender and SMTP Server Name with Port Number.


Once done click on Next and select the new profile created in previous step as Default Profile under pubic profiles.


click Next and Finish. The configuration will be completed.


Let's test the setup created Right Clicking on Database Mail and select Send Test E-Mail...



Enter the Email Address, Subject and Body and click on Send Test E-Mail.


If setting were correct in above listed steps you will receive a E-mail as shown below.


That's all for today, we will discuss How to create operator in SQL and then how to use these operators in SQL for Mail Sending in case of Job success or failure.

Regards,
Saurav Dhyani
http://saurav-nav.blogspot.com/

How to create operator in SQL?

$
0
0

Hi all,

I hope everyone is great. As discussed in last post, lets have a look on how to add operators in SQL.

Use of Operator -

The operator is used in SQL Management Plans and Jobs to send mail in case of Success or Failure of Jobs.
We will discuss how to create jobs and SQL Maintenance Plans in a separate post.

As of now let's stick to agenda and discuss how to create the operator.

Open SQL Server.
Open SQL Server Agent and in Operator folder, Right Click and select New Operator.



Enter Name and Email Address under General Tab.
For Multiple Email addresses use ; as email separator.



There are also other option available like Net Send and pager email.

The Net Send option can also be configured if you want to send a confirmation message on screen.

The Pager email is also same as first option but with this option you can scheduled the week day and time when you want to receive the mail.

After entering email Ids click OK and operator is created.

In the next post we will see how to create a job / maintenance plan and use Of operator in same.

Regards,
Saurav Dhyani
http://saurav-nav.blogspot.in/

SQL Maintenance Plan with Database Mail.

$
0
0
Hi all,

As discussed in last two post about

1) How to Configure Database Mail in SQL Server.
2) How to create operator in SQL?

Let's see the uses of last post in this post, by creating a simple maintenance plan for taking automatic Backup from SQL and Notifying the administrator about success or failure of the Job performed by Maintenance Plan.

There are many Default maintenance Task available in SQL, but for demo we will be using Complete Backup Maintenance Task.

For Running a Maintenance Plan automatically on specific schedule we require to start SQL Server Agent as shown below.


But the SQL Server Agent is set to start manually in services console, so let's change the property of service too as shown below.

As our service properties are set, we are ready to start the DEMO.

1) Open the Management Folder, and Right click Maintenance Plan and select Maintenance Plan wizard.



2) Provide a Name and Description to Maintenance Plan. By Default a maintenance plan is scheduled to to  
    run on demand so let's change the schedule too as shown below.



3) As shown above i want to run my maintenance plan daily at 9:00 PM Starting Today.

4) Click ok and go to next window. Here you will find a list of Maintenance Task that are available by default with SQL.

5) As per demo purpose i will select Backup Database (Full). In the window below you will find the description of the Task as shown below.


6) In the Next Window Select the Database, Folder where you want to store the Backup and click Next as shown below.


7) In Next Window you can specify the path the execution log of the job should be kept and select E-mail Operator whom you want to send the Email (as discussed in last post).


8) In Next window click finish and job will get created successfully.


9) Now you will find the Maintenance Plan Under Maintenance Plan Folder. Double Click the Maintenance Plan created. A window will appear as shown below.


10) From the Left hand panel double click the Notify operator Task twice. Link Main job with both the Notify Operators.

11) Set the properties of the lines, Green Represent Success and Red Represents Failure as shown below.


12) Now edit these Notify operator Tasks as shown below with Email contents as shown below.


13) Now close and save the maintenance plan.

As we have successfully created the maintenance plan, lets test it. Right click the maintenance plan and Select Execute. A confirmation window will appear once job completes as shown below.


Here are the other outputs of job- 1) Email confirmation. 2) Database Backup File. 3) Database Log.


I hope this will help someone. Hope you like the post.

Regards,
Saurav Dhyani
http://saurav-nav.blogspot.com/

NAV 2013 New Language for Indian Database

$
0
0
Hi all,

I was comparing NAV 2013 W1 and NAV 2013 IN for some changes that have been done specifically for INDIA.

During comparison i found that all the objects have some changes. When i drilled it down i found that a new language layer have been added in NAV 2013 for India named as ENN.

I was bit amazed to see this, and was confused that may be i would have missed in previous version. But when i checked in NAV 2009 SP1 IN Database i figured it out that its added in NAV 2013 only.

Below are the images from a localized tables from NAV 2009 SP1 and NAV 2013.



I don't know why it is introduced, but lets see may be we will find use of this new Language Layer in future.

Regards,
Saurav Dhyani
http://saurav-nav.blogspot.com/

Use of NAVDEMO Instance in Development Environment

$
0
0

Hi all,

This post is only for the Development Environment where we NAV Technical and Functional Consultants works on Multiple Versions.

Till NAV 2009 R2 there was no issues that we have all the version running without installing even RTC (with some tweaks).

But Let's See what is the issue we faced when NAV 2013 have launched. Below are some facts which I hope you all will agree.

1) We had seen in earlier post how to run multiple RTC (2013/R2/SP1/2009) on same machine.

2) Before RTC Client was launched we had option to save license into the database which will get automatically sets when we open the database.

3) RTC Take License Information from the SQL server. So the license that have been uploaded on server will be used by all RTC Version we will be using.

4) With NAV 2013 License uploaded on SQL Server, we were getting below listed error which working on RTC R2 & SP1.


5) With NAV 2009 R2 License on SQL Server, we were getting below listed error while using NAV 2013.


5) Resolution was Change the license and restart the service when we switch to R2/SP1/2009 to 2013 or vice versa.

Introduction to NAVDEMO Instance -

If we install NAV 2013 a Demo Installation a new instance in SQL Server that is NAVDEMO is created and the NAV 2013 demo database is created under that domain.

We can change to install the database into the Existing SQL Server Instance by selecting the customize option as shown below.


During installation if we leave SQL Server Instance as Blank, then the database get restored on the standard instance of SQL Server.

USE of NAVDEMO Instance in Development Environment -

1) NAVDEMO is a seprate Instance of SQL.

2) The standard Instance is MSSQLSERVER.

My all old Database i.e before NAV 2013 are lying under the standard Instance.
My all NAV 2013 Databases lies under NAVDEMO Instance.

Licence in Standard Instance is of NAV 2009 R2 (Developer License .
*Supported by all NAV Versions expect 2013.

License in NAVDEMO Instance is of NAV 2013 (Developer License).

I never require to change license while starting the service or switching from RTC R2/SP1/2009 to 2013.

I hope the information can be used in developer environment by all.

Please put comment if you like this article.

Regards,
Saurav Dhyani
http://saurav-nav.blogspot.in/

How to Save License in Navision Database?

$
0
0
Hi all,

I know most of know this but still i am posting this because i was getting queries about it.
* This post only applies to classic client.

Scenario -
While Testing a customization Developed for a customer?

The Development team have completed their task and now internal testing need to be carried. The best way to test a customization is with the customer license.

With this approach we will be able to find out the permission errors (to new objects) if any.

Issue -
The license uploaded on the server is a Partner developer license.

I know we can Change the license for our instance of Navision from Tools -> Licence information -> Change.

Why don't we add the license into the database so that i remain there till we have the database.

How this can be done?

While Creating Database, of if the database have been created then Navigate to File - Database - Information.

Open the integration Tab and check Boolean for Save license in database. Click Ok. System will ask you for a License file that need to be saved in the database.


What Save License in Database Does?

This setting allows you to specify that the license file is uploaded and stored in the database instead of on the server. This is useful if you are hosting several databases with separate license files on the same server.

Hope the information is useful. 

Regards,
Saurav Dhyani
http://saurav-nav.blogspot.com/

NAV 2009 Reports - Common Issue & Resolutions.. (Part 2)

$
0
0
Hi all,

As promised in the blog entry i will list down some common known things that we need to take care while estimating & developing RTC Reports in 2009 Versions.

* These are my faced issues and their resolutions, you may not agree with all these. If that will be case i would suggest you to share same with others.

Lets begin with RTC Report Header -
During development you might have seen that in standard reports there are basically two ways to display report Headers.

1) Using Page Header.
2) Using Header in Body.

When to use which?

Use Page Header when -
1) No conditional Data is a part of Header. (workaround exist from keeping the field as blank from classic).
2) Header is Required on all pages. ( there is not option to print page header in First Page Only).
3) Page x of y is required. (can't set this property in Body as total pages is a global variable).

Use Header in Body when-

1) conditional Data is a part of Header.
2) Header is Required on First  page only.
* IN Table Header there is a property to repeat on new page.

If you have a picture in the Page Header remember these things -

- You don't need to enlarge / size it to the size you want because the property is set to auto size.
- If you try to have a image box with the height that you want in report you will find a space between page header and body. (TESTED)
- If you have the above listed issue then reduce the height of picture box and see the difference.

Let's see RTC Report Footer -


During development you might have seen that in standard reports there are basically two ways to display report Headers.

1) Using Page Footer.
2) Using Footer in Body as Table Footer.



Use Page Footer when -
1) No conditional Data is a part of Footer. (workaround exist from keeping the field as blank from classic).
2) Footer is Required on all pages.
3) Footer Contain Less Data.

Use Footer in Body when-

1) conditional Data is a part of Footer.
2) Header is Required on Last  page only.

A common condition that occur Mostly "FOOTER ON BOTTOM OF LAST PAGE ONLY". 

This is a real business requirement. Suppose you have a sales invoice report which ends data in 2 pages but the last row of Sales Invoice Line comes in the second page 2'nd line.After that line your footer begins.

Will that invoice look likes a professional Invoice? 

No, then how can we achieve that? Have a look on the Report 1401, Cheque Report. As we remember the standard check also print the check information at the bottom of the last page.


If you see the footer is a part of Page Footer inside a rectangle (as we cannot use list / Table in Page Header and Footer) with a hidden condition =iif(CBool(ReportItems!IsLastRec.Value),False,True)

Where IsLastRec is a field in the Body of the Report and its value is set to 
=iif(CInt(CountRows()) = CInt(RowNumber("Table1_Group1")),True,False)


* I was unable to understand the condition so what i did is -
- Create a Boolean variable in classic with include in dataset to TRUE.
- Set the Boolean to True when my last record was printing. IF NEXT = 0 Then "X" = TRUE.
- Set the Boolean as visibility of the Rectangle in Report Footer.

* Remember by using the above listed method if the report is printing in more than 1 page, there will be a blank space in each page until last page. That is the space for the Page footer.

Regards,
Saurav Dhyani
http://saurav-nav.blogspot.in/

How to Check Available Object Range in License?

$
0
0
Hi all,

As most of the reader may know this, but this is still a query from most of the new consultants.

Query -
I have customer license and i want to check the valid object range that have rights in the license file for all types of objects.

Requirement -
While creating a new object for a customer, we need to check that is the Object ID that we are using is a part of the license range that customer have purchased?

How to achieve -

1) Change the license for which you want to see the permission.
2) Create a new form with source table "Permission Range".
3) Select create a form using a wizard and select Tabular- Type Form.
4) Click ok and select all Fields.
5) Click Preview.
6) Apply Filters - FROM >=50000 & TO <=99999.
7) You will be able to see the object Range as shown below.


Regards,
Saurav Dhyani
http://saurav-nav.blogspot.com/
Viewing all 1145 articles
Browse latest View live