👉 Dynamics NAV 2016 - How to Configure
Phone Client.
Hi All,
In this article we will discuss how we can connect Microsoft Dynamics NAV 2016 with New Client Launched i.e. Phone Client.
This Article Contain Steps for an Android Phone as I have Only Android Phone.
I am doing it having single on my windows 8 machine, steps remain same for multiple servers but issues might be different.
What we Need (Other what we discuss in this article) -
The Service Tier should be on Public IP. Some of the Data-card does not provide you Public IP. Check it for sure.
If we are a regular Reader you would remember below articles for Credential Type released earlier. We will be following same step but with a Simple Approach using Powershell.
In this article we will discuss how we can connect Microsoft Dynamics NAV 2016 with New Client Launched i.e. Phone Client.
This Article Contain Steps for an Android Phone as I have Only Android Phone.
I am doing it having single on my windows 8 machine, steps remain same for multiple servers but issues might be different.
What we Need (Other what we discuss in this article) -
The Service Tier should be on Public IP. Some of the Data-card does not provide you Public IP. Check it for sure.
If we are a regular Reader you would remember below articles for Credential Type released earlier. We will be following same step but with a Simple Approach using Powershell.
This is Diwali Gift to all
my Readers. Thank you all.
So let's Start.
Step 1. We Need to have a Certificate to connect Navision Service Tier Using Nav User Password.
----------------------------------------------------------------------------------------------------------------
1. Download PowerShell Scripts From Technet. (LINK)
So let's Start.
Step 1. We Need to have a Certificate to connect Navision Service Tier Using Nav User Password.
----------------------------------------------------------------------------------------------------------------
1. Download PowerShell Scripts From Technet. (LINK)
2. Create the Certificate.
1. Open a PowerShell prompt with the option As administrator.
2. Go to the directory where you saved the New-SelfSignedCertificateEx.ps1 file.
3. Run the following command: Import-Module .\New-SelfSignedCertificateEx.ps1.
4. Then run the following command:
New-SelfSignedCertificateEx –Subject “CN=<your site name>” –IsCA $true –Exportable –StoreLocation LocalMachine
Remember -
<your site name> = Machine Name of the Server where Navision Service Tier Is Installed.
Go To My Computer Properties and Full Computer Name is the Parameter Value.
5. Certificate will be generated once we execute above command as shown below.
6. Manage the certificate:
Open the mmc.exe.
Go to the File menu, and then choose Add/Remove Snap-in...
Select Certificates.
Choose Add.
Select the computer account.
Choose Finish and then OK.
Open the mmc.exe.
Go to the File menu, and then choose Add/Remove Snap-in...
Select Certificates.
Choose Add.
Select the computer account.
Choose Finish and then OK.
Locate and copy the certificate you just created
in the personal/certificates folder.
> Name will be same as your service tier Machine.
> The Expiration Date Will be 1Y-2D (01 Year - 02 Days) for that certificate.
> Valid From 01 Day Before you create Certificate.
Paste the certificate into the Trusted Root Certification Authorities/Certificates folder.
> Name will be same as your service tier Machine.
> The Expiration Date Will be 1Y-2D (01 Year - 02 Days) for that certificate.
> Valid From 01 Day Before you create Certificate.
Paste the certificate into the Trusted Root Certification Authorities/Certificates folder.
Select the certificate, right-click and export the certificate.
Select the No, do not export the private key option.
Choose Next.
Select DER encoded binary x.509 (.cer).
Specify a location and filename and finish the wizard.
Note:
·
Also add and give full permission
to Network Service, why because we have to run services with Network Service.
·
If you didn’t add Network
Service, it might be error while starting the services.
·
Also first install
certificate in server, otherwise you will face problem while starting service.See the bellow screenshot
**Microsoft Dynamics NAV 2016 Phone Client works will all types of Credential Type Available in Service Tier. You can Skip Step 2, Step 3 and Step 4 if you want to use Windows Authentication.
-----------------------------------------------------------------------------------------------------------
Step 2 - Configuration of Service Tier With Credential Type NavUserPassword.
-----------------------------------------------------------------------------------------------------------
1. Create a User in Navision.
For Demo I am using -
UserName - mobileuser
Password - Mobileuser123
Permission - As per your requirement.
2. Open Navision Service Tier and Create a New Service as Shown Below.
3. Change Below Parameters in Newly Created Service.
> Credential Type - NavUserPassword
> Certificate Thumbprint - From the Certificate that we created in Step 1.
> Stop and Start the Service.
> Make sure that service is running with a Domain Account...
** How to Get Certificate Thumbprint.
> Open the Certificate Exported in Step 1.
> Navigate to Details Tab.
> Navigate to Last Property(Certificate Thumbprint) and Select.
> Copy the Value as shown below and paste it in Notepad.
> Paste this value from Notepad to Service.
-----------------------------------------------------------------------------------------------------------
Step 3 -Configure the Windows Client With Credential Type NavUserPassword.
-----------------------------------------------------------------------------------------------------------
1. Navigate to C:\Users\<UserName>\AppData\Roaming\Microsoft\Microsoft Dynamics NAV\90
** Replace <UserName> With Your Name.
2. Change ClientServicesCredentialType Paramter in ClientUserSettings.config file.
-----------------------------------------------------------------------------------------------------------
Step 4 -Configure the Web Client With Credential Type NavUserPassword.
-----------------------------------------------------------------------------------------------------------
1. Navigate to C:\inetpub\wwwroot\DynamicsNAV90.
2. Change Following Parameters in Web.config file.
> ServerInstance
> ClientServicesCredentialType
> ClientServicesPort
My Values -
> ServerInstance - PhoneClientDemo
> ClientServicesCredentialType - NavUserPassword.
> ClientServicesPort - 200046
-----------------------------------------------------------------------------------------------------------
Step 5 - Configure the Web Server For Web , Tablet & Phone Client.
-----------------------------------------------------------------------------------------------------------
1. Open IIS Manager.
2. Select Microsoft Dynamics NAV 2016 Web Client.
3. From Right Hand Panel Select Binding and create a Binding for https using the certificate you added in Step 1, as shown below.
4. Stop and Start the Web Site.
5. Browse web client using https://<<Certificate Name>>/DynamicsNAV90/
Where -
<<Certificate Name>> = Navision Server Name, as we used the Server name in Step 1 which creating Certificate.
DynamicsNAV90 - because we haven't created New Web Server Instance for Same and Modified the Setting on Existing Web Instance.
-----------------------------------------------------------------------------------------------------------
Step 6 - A Conman Error While Binding Certificate to IIS Web Site.
-----------------------------------------------------------------------------------------------------------
The process cannot access the file because it is being used by another process. (Exception from HRESULT: 0x80070020)
Cause - That Means the Port is being used by some other application. In our case we were using port 443.
How to Identify Which application is using - Find Process ID of the application using command at command prompt -
netstat -aon | find ":443"
Just goto Task Manager and From Details Tab Select the Process and Kill It.
** If you want use a different port you can use that in Step 5 during binding.
-----------------------------------------------------------------------------------------------------------
Step 7 - Install Certificates on the Phone.
-----------------------------------------------------------------------------------------------------------
1. For Android, do the following:
> Copy or mail the certificate that you exported.
> Run the certificate file and install the certificate.
> You are now ready to start the Dynamics NAV app.
2. For Windows, do the following:
> If you run the client on the same box as the web server, then you are all set to go.
> Copy the certificate you exported to the tablet, install the certificate and place the certificate in the Trusted root certification authorities folder of the local machine.
For IOS, do the following:
> Use the iPhone Configuration Utility tool from Apple http://support.apple.com/downloads/#iphone or mail the certificate you exported.
> Run the certificate file and install the certificate.
> You are now ready to start the Dynamics NAV app.
-----------------------------------------------------------------------------------------------------------
Step 8 - Browse All Client. (Follow the Order, it makes it easy to resolve issue)
-----------------------------------------------------------------------------------------------------------
1. Open Role Tailored Client.
2. Open Web Client.
3. Open Tablet Client. (URL - https://<<Certificate Name>>/DynamicsNAV90/)
4. Open Phone Client. (https://<<Certificate Name>>/DynamicsNAV90/)
-----------------------------------------------------------------------------------------------------------
Hope the above steps help you while you are
planning to configure different client types with Microsoft Dynamics NAV 2016.
Love to hear comments from U 4 my posts.
Reference : https://saurav-nav.blogspot.in/2015/11/microsoft-dynamics-nav-2016-how-to.html
Reference : https://saurav-nav.blogspot.in/2015/11/microsoft-dynamics-nav-2016-how-to.html
Thanks & Best Wishes
Binesh Singh Rajput
----------------------------------------END----------------------------------------👉 Steps for Importing Records From Excel Into Table Object in MS Dynamics NAV 2013 R2
Hi All,
In this article we will discuss how we can Importing Records from Excel into Table object in MSD NAV.
In this article we will discuss how we can Importing Records from Excel into Table object in MSD NAV.
--------------------------------------------------------------------------------------------------------------
STEP - 1:
CREATE a new Report with Blank DataItem (or) With DataItem (e.g Customer), In My Demo I used Blank DataItem.
Properties : Value
------------------------
ProcessingOnly Yes
-----------------------
STEP - 2:
Create Globals Variables. [ Hint : View -> C/AL GLOBALS ]
VAriable_Name DataType SubType Length
-----------------------------------------------
CustomerDemo Record 50000 [Note : 50000 Is a "Customer Demo Table"
Excelbuffer Recoed 370
ServerFileName Text 50
SheetName Text 50
ImportFromExcel Boolean
RecNo Integer
NoOfRowsSkip Integer
i Integer
----------------------------------------------
Create Globals Constant Variables.
-------------------------
Name ConstValue
Text000 %1 table has been successfully updated with %2 Records.
Text001 Select (or) Import Excel File
ExcelFileExtensionOk .xlsx
----------------------------------------------
STEP - 3:
Design RequestPage (Follow By [VIEW -> Request Page])
------------------------------------------------------
Expanded Type SubType SourceExpr Name Caption
----------------------------------------------------------------------------------------
1 Container ContentArea RequestPage <RequestPage>
1 Group Group Options <Options>
0 Field ImporFromExcel ImportFromExcel Import From Excel
------------------------------------------------------------------------------------------------
STEP - 3:
OPEN the C/AL Editor { Note: Press F9 - on Request Options Page Designer, Only. }
---------------------------------------------------------------------------------
Create Local Variables. [ Hint : View -> C/AL LOCAL ]
-----------------------------------------------------
Name DataType Subtype Length
-----------------------------------------------------
FileMgt Codeunit 419 - File Management
Answer Boolean
------------------------------------------------------
STEP - 4:
Write Code on the Following Trigger:
######## Start ############[Trigers]###############
OnQueryClosePage(CloseAction : Action None) : Boolean
// Code Start
IF ImportFromExcel THEN
BEGIN
IF CloseAction = ACTION::OK THEN // Validation For OK Button.
BEGIN
ServerFileName := FileMgt.UploadFile(Text001,ExcelFileExtensionOk);
IF ServerFileName = '' THEN
EXIT(FALSE);
SheetName := ExcelBuffer.SelectSheetsName(ServerFileName);
IF SheetName = '' THEN
EXIT(FALSE);
END;
END;
IF CloseAction = ACTION::Cancel THEN // Validation For Cancel Button.
BEGIN
Answer := CONFIRM('Are you sure want to Cancel?');
IF Answer THEN
EXIT(TRUE)
ELSE
EXIT(FALSE)
END;
IF ImportFromExcel = FALSE THEN // Validation For CheckBox.
BEGIN
Answer := CONFIRM('You did not select ImportFromExport Check Box.\ If You Click Yes Then You Will Exit From Importing UI.');
IF Answer THEN
EXIT(TRUE)
ELSE
EXIT(FALSE)
END;
// Code End
######## END ############[Trigers]###############
STEP - 5:
SELECT Report DataSet Designer [Thru.- Window -> [# Report #ID ImportFromExcel - Report Dataset Designer.
------------------------------------------------------------------------------------------------
OPEN the C/AL CODE [ Hint. View -> C/AL Code, (or) F9]
-------------------------------------------------------
Step - 6:
WRITE the Following Code on respective Trigers.
--------------------------------------------------------
######## Start ############[Trigers]###############
----------------------------------
OnInitReport()
ImportFromExcel := TRUE;
-----------------------------------
OnPreReport()
ImportExcelData() // User Define Function
-------------------------------------------------------------------
OnPostReport()
IF ImportFromExcel THEN
BEGIN
ExcelBuffer.DELETEALL;
IF i > 0 THEN
MESSAGE(Text000,CustomerDemo.TABLECAPTION,(i-NoOfRowsSkip));
END;
-----------------------------------------
########### END ##########[Trigers]###############
------------------------------------------------------------------------
######################## My Function #############
ImportExcelData()
// Code for Importing Records From Excel to NAV Table
IF ImportFromExcel THEN
BEGIN
CustomerDemo.DELETEALL;
ExcelBuffer.LOCKTABLE;
CustomerDemo.LOCKTABLE;
CustomerDemo.INIT;
NoOfRowsSkip := 5; // Bcoz I have planned to skip First 5 Rows/Records.
i := NoOfRowsSkip;
ExcelBuffer.OpenBook(ServerFileName,SheetName);
ExcelBuffer.ReadSheet;
IF ExcelBuffer.FINDFIRST THEN
REPEAT
IF (ExcelBuffer."Row No." = i) AND (ExcelBuffer."Column No." = 1) THEN
CustomerDemo."No." := ExcelBuffer."Cell Value as Text";
IF (ExcelBuffer."Row No." = i) AND (ExcelBuffer."Column No." = 2) THEN
CustomerDemo.Name := ExcelBuffer."Cell Value as Text";
IF (ExcelBuffer."Row No." = i) AND (ExcelBuffer."Column No." = 3) THEN
CustomerDemo.Address := ExcelBuffer."Cell Value as Text";
IF (ExcelBuffer."Row No." = i) AND (ExcelBuffer."Column No." = 4) THEN
EVALUATE(CustomerDemo."Balance (LCY)", ExcelBuffer."Cell Value as Text");
IF (ExcelBuffer."Row No." = i) AND (ExcelBuffer."Column No." = 4) THEN BEGIN
CustomerDemo.INSERT;
i += 1;
END;
UNTIL ExcelBuffer.NEXT = 0 ;
END;
// End Code
-------------------------------------------------------------------------
############### END Function #############################
STEP - 7:
SAVE, COMPILE And RUN.....
-----------------------------------------------
Thanks & Best Regards
Binesh Singh Rajput
(MCP, MS, MCTS)
----------------------------------------------
##########################################################
No comments:
Post a Comment