Tuesday, 24 January 2017

Deploy 365 for Operations through LCS

Overview of the Basic Steps 
To setup AX7 or Microsoft Dynamics 365 for Operations. 
Prerequisites
  • Azure Subscription 
    • Two virtual machines of  D13, don't worry about setting this VM, it will be done automatically during setup. 
  • Microsoft Office Account
  • Browser mode must be InPrivate Browsing mode for Microsoft Edge browser or Incognito window for chrome browser
  • If you want to use your normal browser mode, delete its cookies and restart your browser.
With all these set, you can 

Start a new project in LCS
To use Lifecycle service to manage your environment you must create a project
  1. Goto https://lcs.dynamics.com.logon/index
  2. click sign-in
  3. Login with your Microsoft office 365 account
  4. Click + icon to create a new project
      5. Select project type

       6. Enter project information and click create

Creating a project was easy. Now let's Deploy environment

Before you deploy your environment you must setup VSTS,(Visual Studio Team Services).
VSTS Setup
  • Login to https://www.visualstudio.com
  • Click "Free Visual Studio" in top right corner
  • Under the Visual Studio Team Services, click "Free Account"
  • The user who wants to be VSTS owner should sign in with his/her work account.
  • Enter a customer/organization specific URL
  • Choose Team Foundation Version Control (TFVC) and click continue.
  • The VSTS account is created https://<org/customer>.visualstudio.com. This comes with a default project "My FirstProject".

In order to connect VSTS to LCS you will create another project.
  • Click on "Team Services" in the top left corner to exit the project
  • Click New under "Project and Teams"
  • Enter Project Name, Process Template must be Agile, Version control must be TFVC
  • Click "Create Project"

Finally for this section you need a Personal Access Token
  • Click on your name in the top right corner
  • Select security
  • Click on  Personal Access Token
  • Click Add
  • Enter a description
  • Expiration date: choose the maximum
  • Under Authorized Scope: Select All scopes
  • Create token.

This generates an alpha-numeric token which should be copied and saved because it is important for the connection to LCS.

Setup LCS integration with VSTS
  • Goto LCS: Setup VSTS is either found on the LCS homepage or in Project Settings


  • Enter VSTS Url
  • Paste Personal Access Token


  • Click Continue
  • Select the new  VSTS Project you created.


  • Click Save
  • Click Authorize


  • Click Yes


  • Click Accept

  • Setup is Complete


With VSTS Setup let's move on to the next phase. The Final Saga

Integrate LCS with Azure
NB: The steps in this section require the old and new Azure portal.
  • Goto Project Settings.
  • Click on Azure Connector on the left navigation pane.
  • Follow the steps here to Integrate LCS with Azure successfully.
After a successful integration, you should have something like this 



Deploy Environment
Environment should be deployed to an existing Azure subscription.
You can create an environment in two ways:
  • Deploy to Microsoft cloud (Azure)
  • Download the local VHD and operate it on-premise.

My thought on that if you ask, just go with the cloud. it takes more than enough resources to operate AX7 on-premise and also since 365 for operations is a cloud platform why drag yourself backwards.

  • Click on cloud hosted environment
  • In the Environment Click the +Add icon
  • Select your environment


  • Select the topology to deploy
  • Deploy your environment: Environment must not have space or number


  • Click the environment to view details about the deployment status.
  • The first deployment will take a few hours, but each subsequent deployment will be much faster.
  • When the deployment status changes to Deployed, click Login to connect to the client, or click the VM name to the development machine by using Remote Desktop.
  • After the deployment is completed, you can find the base URL, and also the information that you require to connect to the environment via Remote Desktop

Monday, 23 January 2017

Microsoft Dynamics 365 for Operations Basic Setup

System Administration in AX7

Objectives 
  • Basic Data Setup and Configuration
  • Configure User and Security
  • Data Import and Export in AX

Basic Data Setup

Global Address Book is a central repository that contains information about each party that an organization has contact with.
Number Series: is a number sequence that defines the number available for use and the formatting of these numbers
  • Transactional Numbering: gives each transaction a unique number e.g. General Ledger, Purchase Order number, Invoice numbering.
  • Master Data Numbering: gives each master data a unique number e.g customer, vendor, workers.
  • System-wide Numbering: Basic numbering for basic processes and it is not module specific e.g. Activity, Case Number.

Legal Entity: is an organization that is identified through a registration with the legal authority
A company in AX is used to collect transactions related to one legal entity.
Multi-company Setup:
  • Currencies & Exchange rate: it facilitates upkeep of daily exchange rate
  • Fiscal Calendar: represents financial reporting periods.
  • Financial Dimensions: analyze financial data in more detail
  • Products determine the product setup of the company.

License Configuration and Parameters
License keys are used to control general access t functionality in the system.
Parameter forms each module control the specific function of each feature.
Configuration can be used to enable or disable smaller pieces functionality of the organization 

User
Users are connected to the Active Directory in order to work in AX.
Security Role gives access to functionality based on an employee's role in the organization.
A worker is linked to the user record through a user relationship record. This links users to Employees and allows functionality like commission and access to Enterprise Portal (EP).
User Profile: This linked to the user record to a Role Center which will be displayed as the homepage when logging into the rich client r Enterprise Portal

NOTE: Once a record is created in the worker section, it is automatically created in the Global Address Book.


Data Import & Export Tools
  • Data Import & Export Framework
  • Data Packages: these are XML files and transactional data uploaded into LCS and the data is deployed into AX
  • Excel Data connector.

Thursday, 15 December 2016

Microsoft dynamics NAV Report

In simple term, Report is used to display certain information as specified in your filter from a database. Two important tasks are required to create a report
  • Designing the data model or dataset by using Report Dataset Designer
  • Design the Visual Layout: Also divided into 2
    • RDLC - Client Report Definition report Layout: created using Visual Studio Report Designer or SQL Server Report Builder.
    • Word Layout: created using Microsoft.
NB: I will only go into RDLC only

Report Dataset determines the data that is extracted or calculated from the Microsoft Dynamics NAV database tables that can be used in a report. Report Dataset is built from data items --which are tables and columns -- which can be any of these: field, variable, expression or text constant.

How to Create a Report Dataset
  • Open the Object Designer and select Report from the left navigation pane.
  • Click New to open a new Report
  • In the first blank line select the data item, the datasource and a CLS complaint name as the name.
  • In the second line select the column(s) you want for your report. 
    • Click View >> Select Field Menu to choose the fields you want. You can select multiple by holding down CTRL or SHFT key.
  • You can link Tables by indenting data items (table) under another data items (table)
    • Make sure you verify the DataItemLinkReference property is set to the Parent data item.
    • Also use the DataItemLink to connect the Tables - just like in SQL connecting the primary key to the foreign key (by setting the field and reference field)

Design the Visual Layout

The layout is designed in Microsoft Visual Studio Report Designer
It starts by opening Visual Studio Report Designer from the Report Object Designer in NAV Development environment.

  • Report >> Design
  • Click View >> Layout: this opens visual studio.
  • On VS, Click View >> Report Data: pin this to the left navigation pane of the IDE

From the Toolbox, drag a Table to the Designer, Right-Click the header to add Column (as many as required).
It is good practice not to hard-code your table therefore follow these steps to name your header and textbox values

  • Right-Click the header >> select Expression 
  • For the header. Select the parameter and double click the value. Repeat this step for all your headers


  • For the textbox: Select the Fields (second row) and double-click the value. Repeat this step for all your textboxes.



In the Properties window, select the Table properties and set the property DataSetName to DataSet_Result -which is automatically done by visual studio.

The Request Page

Request pages enable end users to specify options and filters for a report. It is created by default when a new report created. In addition, you can create custom options in the Request Page.You design these options  y using the Request Options Page Designer which is accessed from the Report Designer.

There are so any properties and functionalities in Report that I can't cover half of it in this blog, so I'll advice you to visit MSDN for more information

BUT
The headache here is that any visual design has to be done in Visual Studio and  you have to close VS before you can run the report on the RoleTailoredClient. This means any little customization requires you to open VS, make customization and close VS again before running report. 

Thursday, 8 December 2016

Could not load file or assembly

I noticed after my upgrade to Microsoft Dynamics NAV 2015 version 8.00.40938  I get an error message on one of the boxes in my RoleCenter View 
"Control Add-in is missing could not load file or assembly Microsoft.Dynamics.Nav.Client.BusinessChart.Model".
I realized I was missing something then I tried this

This resolved my issue
I copied the BusinessChart Folder from my NAV Setup file into two paths on my C-drive
  •  C:\Program Files\Your_Path\Add-in\
  •  C:\Program Files (x86)\Your_Path\Add-in\
With this I was good to go. Happy me!!

Microsoft Dynamics NavClient stopped working


I read a lot of blogs to fix this issue but they all didn't work for me until I stumbled upon this, followed the one-time-step and it worked. This is the link to the step. Click here


How to Check the service running on your port.

I installed Microsoft Dynamics Nav 2015 on my machine and when I run it I get an error saying "Nav can't create a connection to the server". As usual I checked my event viewer to get a detailed message of the error. Then I found out another service -an earlier version of Microsoft Dynamics NAV (2013) was running on the same port as my Nav 2015. How did I know this?
  • Open command line
  • To check Service running on your port
    netstat -noa | find "port number" : It displays the PID
  • tasklist | find "PID"  : It displays the name of service running on your port which you can trace on Task Manger to disable it
Note: The PID is the last number after LISTENING
These simple steps saved my day as I was able to stop the process running on my port in Task Manager.



Tuesday, 6 December 2016

Microsoft Dynamics NAV Codeunit

Codeunit is a container for C/AL code that you can use across different application objects. -- just think of it as a class of functions.

Codeunit by default contains two functions: Documentation and OnRun
Documentation: where you write descriptive information about the codeunit
OnRun: It executes any code when you run the codeunit.

By using codeunit, you eliminate the need for duplicate code and make code easier to maintain. You can access the codeunit's function from another codeunit by declaring a datatype of codeunit in a variable and specifying the name of the codeunit in the subtype. Then you can do this 
<CodeunitVariableName>.<FuntionName>. To access a codeunit from other application objects, you must set the Local Property of the function to "No"