Advertisements

Microsoft Dynamics NAV ‘Tenerife’ Developer Preview

As everyone is aware by now that Preview of Development Tools for Dynamics NAV have been released. Going forward which can be used to build extensions and apps in and for Dynamics NAV.

This tool introduces two flavors which you can try out in preview available on cloud.

[A] Make an extension in the client itself. Business consultants and UX designers will love using this drag-and-drop interface. Rearrange fields, rename groups, and reposition elements to build a perfect extension to support an industry-specific solution or implement a business process optimization.

[B] Use the AL Extension for NAV in Visual Studio Code to build powerful extensions based on tables, pages, and codeunits using the new objects: Page Extensions and Table Extensions. Follow this route to build rich extensions that reuse and extend core business logic in your application.

For more details you can refer to the article published by Dynamics NAV Team Announcing the Preview of Development Tools for Dynamics NAV

You can get a free 30-day trial from https://azure.microsoft.com/free/ that will give you access to everything you need.

Secondly, head over to http://aka.ms/navdeveloperpreview. Login to your Azure Subscription. Select your subscription, resource group, location, name, and a VM Admin Password. Leave the remaining fields as their defaults. Accept the terms, Pin to dashboard and select Purchase. The instance takes about 5 minutes to set up, and the VM will be ready about 15 minutes after Azure says Deployment Succeeded.

You need to follow on screen instructions to get everything setup using above 2 links provided.

I am not going to repeat the steps as you can find them via other blogs or follow the steps as you proceed via using above two links.

Few of my readers were complaining about they don’t have access to Azure Subscription or they have already used up the limit now what to do?

Same situation was with me too, but however I managed to get one and done bit RND, if this can be setup on my PC so that I can give it a try or others can use same steps to get it configured, and give it a try.

However I got succeeded in doing so, now I can do the same in my environment.

The Steps I am going to explain below is not the straight forward, and require bit tricks, as required components are yet not released from Microsoft, may we can get in CU-2,  I guess or later when Microsoft is OK to release this feature for everyone.

This action will require several pre-requisite to be fulfilled:

  1. Visual Studio Code (To be Installed)
  2. Dynamics Navision Version (10.0.14540)
  3. Some Modification to web.config to enable designer in Web Client

 

STEP-1

You can download the Visual Studio Code from this link: Click Here

Once file is downloaded install the Visual Studio Code by running VSCodeSetup-1.8.1.exe

And follow the on screen instructions to complete the setup.

 

td-01td-02td-03td-04td-05td-06td-07td-08td-09

STEP-2

Dynamics Navision Version

Make sure you have correct version of Dynamics Navision (10.0.14540)

td-10

Else you will not get this option in your Service Window

td-11

STEP-3

Modification to web.config

You will need to make necessary settings to web.config file to enable designer in Web Client, this file is located at C:\inetpub\wwwroot\DynamicsNAV100 location where your Web Client is installed.

td-12

td-13

 

Now you should be ok to use this feature in your environment.

Once things are setup correct you will be able to find the Client Designer Button on right top corner of the Client Window/Browser.

I will come up with more details in my up-coming posts till then keep exploring and learning.

 

 

 

Advertisements

App for Power BI REST APIs for Streaming Data

In this post we will see how to create app to use the Power BI REST APIs for Streaming Data.

Full documentation: https://powerbi.microsoft.com/documentation/powerbi-service-real-time-streaming/

To run this app follow the steps discussed in my previous post: [Real-Time Dashboard Tile & Streaming Dataset– in Power BI]

Summary as below:

  1. Go to app.powerbi.com
  2. Go to streaming data management page by via new dashboard > Add tile > Custom Streaming Data > manage data
  3. Click “Add streaming dataset”
  4. Select API, then Next, and give your streaming dataset a name
  5. Add a field with name “Customer ID”, type Number
  6. Add a field with name “Customer Name”, type Text
  7. Add a field with name “Sales Value”, type Number
  8. Click “Create”
  9. Copy the “push URL” and paste it as the value of “realTimePushURL” in below app

We will start with new project in Visual Studio.

RealTimeSync-12

Create a new Visual C# Console Application.

Open the Program.cs File and write a code as shown below.

This app Uses the WebRequest sample code as documented here: https://msdn.microsoft.com/en-us/library/debx8sh9(v=vs.110).aspx

RealTimeSync-13

For your easy here is the code of Program.cs below:

 

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

using System.Net;

using System.IO;

 

namespace RealTimeStreaming

{

class Program

{

// Paste your own push URL below as obtained from while creating Streaming Dataset and saved in step 9 above

private static string realTimePushURL = “https://api.powerbi.com/beta/4e7ca966-123e-4ce7-9833-3e858854b98f/datasets/7d154cd7-11e0-4d5e-9569-12fa3f82f224/rows?key=mD1nkJOf426PjPPaEQsW9xEg%2FN1EENQ2hRZvXIpHr%2BTXNk3XQpKsR2Jbe5CATiMoLmxjlzSp%2FIMlbe9HL8G4xQ%3D%3D”;

static void Main(string[] args)

{

while (true) { //Set Infinite Loop

try

{

// Declare values that we will be sending

Random r = new Random();

int currentValue = r.Next(0, 100);

String Name = “Dummy Name”;

// Send POST request to the push URL

WebRequest request = WebRequest.Create(realTimePushURL);

request.Method = “POST”;

 

//Here you will retrieve the data from the source and format as per the request.

//In this example we are sending Random Value generated by above code for testing purpose.

string postData = String.Format(“[{{ \”Customer ID\”: {0}, \”Sales Value\”:{1} }}]”, currentValue,currentValue);

Console.WriteLine(String.Format(“Making POST request with data: {0}”, postData));

 

// Prepare request for sending

byte[] byteArray = Encoding.UTF8.GetBytes(postData);

request.ContentLength = byteArray.Length;

// Get the request stream.

Stream dataStream = request.GetRequestStream();

// Write the data to the request stream.

dataStream.Write(byteArray, 0, byteArray.Length);

// Close the Stream object.

dataStream.Close();

// Get the response.

WebResponse response = request.GetResponse();

// Display the status.

Console.WriteLine(String.Format(“Service response: {0}”, ((HttpWebResponse)response).StatusCode));

// Get the stream containing content returned by the server.

dataStream = response.GetResponseStream();

// Open the stream using a StreamReader for easy access.

StreamReader reader = new StreamReader(dataStream);

// Read the content.

string responseFromServer = reader.ReadToEnd();

// Display the content.

Console.WriteLine(responseFromServer);

// Clean up the streams.

reader.Close();

dataStream.Close();

response.Close();

}

catch (Exception ex)

{

Console.WriteLine(ex);

}

// Wait 5 second before sending

System.Threading.Thread.Sleep(5000);

} //Infinite Loop ends here.

}

}

}

Compile and Run the Program.

RealTimeSync-14

Leave the Program Running and switch to Power BI dashboard. You will see your newly created Tile in previous post will be displaying the Random Value generated by this program updating every 5 seconds.

That’s all with little tweaking to this program you can fetch your data and send the updated data to your Real Time Streaming Dataset.

That’s end to this post.

I will come up with more details in my upcoming posts.

Till then keep Exploring and learning.

 

 

Announcing the Microsoft Dynamics NAV Universal App (Dynamics NAV v2.0)

Maybe you’re already familiar with Dynamics NAV on your tablet. Well, things just got even more flexible. You can now experience the power and simplicity of the Microsoft Dynamics NAV Universal App on your preferred iOS, Android or Windows device – be it phone, phablet, tablet, laptop, or desktop – it’s all up to you. Switch to your favorite device on the go, during meetings, in the office, at home on the couch using the same app, accessing your Dynamics NAV business data from everywhere.

For more details see below link :-

https://blogs.msdn.microsoft.com/nav/2015/10/22/announcing-the-microsoft-dynamics-nav-universal-app-dynamics-nav-v2-0/

Commenting and uncommenting multiple lines of C/AL Code

We can add and remove comment marks manually for each line till now. But from now the Comment Selection and Uncomment Selection options available in the Edit menu. The Comment Selection and Uncomment Selection options enable you to comment or uncomment multiple lines of code all at once.

  • To comment lines of code, select the lines, and then, in the Edit menu, choose Comment Selection (Shift+Ctrl+K).
  • To uncomment lines of code, select the lines, and then choose Uncomment Selection (Shift+Ctrl+O).

 

Comment / UnComment Selection

Microsoft Dynamics NAV Tablet Client

In Microsoft Dynamics NAV 2015 Microsoft introduced a new interface called Microsoft Dynamics NAV for Tablet. The Microsoft Dynamics NAV for Tablet allows users in small and medium sized businesses to access data from a tablet. Developing for Microsoft Dynamics NAV for Tablet is very similar to developing for the Microsoft Dynamics NAV Web client using the Microsoft Dynamics NAV Development Environment.

To open Microsoft Dynamics NAV for Tablet in browser mode

  • The Role Center for the default company

http://NavisionWebClient:7080/DynamicsNAV80/WebClient/tablet.aspx

  • The Role Center for a specific company

http://NavisionWebClient:7080/DynamicsNAV80/WebClient/tablet.aspx?company=CRONUS%20International%20Ltd.

  • A specific page

http://NavisionWebClient:7080/DynamicsNAV80/WebClient/tablet.aspx?page=22

 

Replace (http://NavisionWebClient:7080/DynamicsNAV80) with URL for Web Client in your environment.

How it looks:

Tab Screen

You will have to install below App: http://apps.microsoft.com/windows/en-in/app/d8a4908d-61f2-4740-b4fc-b559fbdd2e51

Important

Most of the contents you find in this blog will be either inherited from MSDN or Navision Developer IT Pro Help. Some places images are also directly taken from these sites. Purpose is simple to try those stuffs and re-produce adding few things as per my understanding to make easy understanding for others and quick reference.

Here nothing under my own brand or authorship of the content. At any point of time we are just promoting Microsoft stuffs nothing personnel with same.

Hope stuffs used here will not violate any copyright agreement with them. In case by mistake or in-intestinally it happens and the Microsoft feels these should not be used Microsoft have full right to inform me about same and will be glad to take down any such content which may be violating the norms.

Purpose is to promote Navision and share with community.

FB Profile

Like FB Page

%d bloggers like this: