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.

 

 

Advertisements

Setting different Column Layout for different users

On Community Forum i came across one requirement for opening Page with different column on Page for different users.

Here i have given an demo how can be done, but will require some tweaking to achieve the actual result.

I have copied the Customer List Page and removed extra fields.

Playing with columns1

I have added one Field above Repeater so that we can decide which format we want to see on screen. User can enter 1/2/or any other value.

I have created two more variables Set1 and Set2 to show/hide fields as per the value entered in SetSelect.

Assigned the Set1 & Set2 to few columns on the Page Fields to Property Visible.

Set1 to Responsibility Center, Location Code & Currency Code.

Set2 to Post Code, Country/Region Code, Phone No. & Fax No.

Added code on OnOpenPage Trigger to select Default page Format when Page is Opened. This code you will modify as per your requirement like check the User and assign the default Value.

Added Code to SetSelect-OnValidate Trigger to select the required format of Page. You need to modify the code as per your requirement.

Playing with columns2

In this demo if user enter value for SetSelect and you will get different view of same page.

Do some research and design one as per your requirement, this way we need not to create different Pages for different Users. Same Page can serve you different purpose if limited to only different views.

I will come with more information in my upcomming posts.

Till then keep browsing and learning.

 

Schedule SQL Job for SQL Database Backup

 

Today we will see how we can schedule to take daily backup of our database.

Before i start explaining the step i am confirming the version of SQL based on which i am writing this post.

Process will remain same may be screen bit different in different versions of SQL.

SCheduleJob-1

At first we will ensure that SQL Server Agent is running, in case it is not right click and Start it.

SCheduleJob-1

Expand the SQL Server Agent Folder, Select Jobs, Right click and select New Job.

SCheduleJob-1

Provide Name & Description to your New Job.

SCheduleJob-1

Select Page Steps & New from Bottom of the page to define Step for your Job.

SCheduleJob-1

Give name to the Step.

Select Type as Transact Script (T-SQL).

Select Database Name in my case i am selecting Demo Database NAV (9-0)

Write the Script as shown below:

SCheduleJob-1

Here is the Script for your ready reference:

{– Script Start

SET QUOTED_IDENTIFIER off

select getdate() “Start Time”

set nocount on
declare @dbname varchar(36),@cmd varchar(255)

declare dbname_cursor cursor
for select name from master..sysdatabases where name = ‘Demo Database NAV (9-0)’
order by name

open dbname_cursor
fetch dbname_cursor into @dbname

while @@fetch_status = 0
begin
DECLARE @DATE VARCHAR(36)
SELECT @DATE = (select CONVERT(char(8),DATEADD(dd,-30,GETDATE()),112))
if DATABASEPROPERTYEX(@dbname,’Status’) = ‘ONLINE’
begin
select @cmd =’backup database [‘+@dbname+’] to DISK=”C:\User Data\SQL Backup\’+@dbname+’.bak” with init’;
print @cmd
execute (@cmd)
end
fetch dbname_cursor into @dbname
end

close dbname_cursor

deallocate dbname_cursor

select GETDATE() “End Time”

–Script End}

Although above script is for multipurpose like if you want to backup all database on your SQL Server, you can make small tweaking and you are done.

If you would like to backup all the databases on a particular SQL Server, then make the following changes to the code above.

Replace following line of code:

for select name from master..sysdatabases where name = ‘Demo Database NAV (9-0)’

with the following line of code:

for select name from master..sysdatabases where name != ‘tempdb’

This will create a backup file for each database on the server, except for the temp database.

Next : Switch to Advanced Page.

Define other parameters as shown in below screen as per your requirement.

SCheduleJob-1

On Selecting OK, you will return to Job window.

SCheduleJob-1

Select Schedule Page:

Define your Schedule as per your requirement.

SCheduleJob-1

Select OK to return to Job Page.

SCheduleJob-1

Select OK to close and save the JOB.

Now our Job is  created and scheduled.

You can see defined Jobs and its Status using Job Activity Monitor.

Before Job is executed

SCheduleJob-1

After executed you can see the Status as.

SCheduleJob-1

Post execution of Job here is the backup file created at defined path in the Script. Above script will overwrite the file on next execution.

If you want to create new file on every execution you need to modify the script for file name by adding timestamp or any other logic you desire.

SCheduleJob-1

I will come up with more information in my upcomming posts.

thats all for this post.

 

Finding the Right Business Intelligence Solution for your Company

Get answers to the most commonly asked questions around what to look for in a business intelligence solution and provider, including implementation expectations, important features to look for (that you probably didn’t know you need), and different options for report and dashboard distribution.

Watch Video here :

 

Create Production Orders for/from Sales Order

One of my reader have requested to demonstrate how he can create Sales Order which is directly associated with Sales Order.

Let us start with creating a Sales Order:

ProdOrder-1

Here you can see we don’t have Available Inventory to fulfil the demand of this Order.

ProdOrder-2

To fulfil the demand we will create Production Order for this Order.

Select Planning from Action TAB on Ribbon.

Sales Order Planning Window Opens, Select Create Production Order.

ProdOrder-3

Select the Status for Production Order as desired.

For Order Type you have 2 Options

  1. Item Order – Production Order is created for each Item on Lines
  2. Project Order – Single Production order for Entire Order

Select the desired option and respond to Yes.

ProdOrder-4

I have Selected Released & Project Order in my case.

ProdOrder-5

You can check that Quantity to be produced is reserved for this Order.

There could be the situation where you may have few Inventory available, in that case you need to reserve the quantity from Function before creating Production Order else all quantity will be created. In other case only short quantity will be a quantity of Production Order.

ProdOrder-6

Select the line from available lines in Item Ledger Entries (e.g. on hand inventory) and by using the ‘Reserve from Current Line’ function you can reserve those against the sales order line.  The ‘Reserved Quantity’ then gets updated and you can see the rest in the ‘Unreserved Quantity’ field.

ProdOrder-7

Although in this case entire line is already reserved from the Production Order.

But in case you want to reserve from any available Inventory in hand from Ledger entry.

This was one of the way how you can perform Creating Production Order and Reserving for Sales Order.

We can do the same by another way as below, directly creating Production Order for this Sales Order.

ProdOrder-8

Create a Production Order Select Source Type as Sales Header and Source No as Sales Order No.

Then Refresh the Production Order.

ProdOrder-9

 

 

ProdOrder-10

 

This way we can create and Reserve the Item for required demand.

I will come with more details in my upcoming posts.

 

Microsoft Power BI – Part IX

Continuing from my previous post. Today we will see usage of Power BI Publisher for Excel.

In case you have missed my previous posts here I present the link to all previous posts below.

Microsoft Power BI – Part – I

Introduction to Power BI and Creating Report from Excel Data, Local Files.

Microsoft Power BI – Part – II

Introduction to few Features of Power BI

Microsoft Power BI – Part – III

Power BI Desktop, Creating Dataset & Reports from In Premise Database installation

Microsoft Power BI – Part – IV

Power BI Gateway usage

Microsoft Power BI – Part – V

Scheduling Refresh of Dataset & Report created using In Premise Database

Microsoft Power BI – Part – VI

Power BI Content Pack

Microsoft Power BI – Part – VII

Power BI Mobile App

Microsoft Power BI – Part – VIII

Power BI Content Pack

Sharing key Excel insights just got easier. Save snapshots of important PivotTables, Charts, cell ranges, and more from across all of your spreadsheets to a single location quickly with the Power BI publisher for Excel. Simply highlight the elements you want to save, then click the “Pin to” button: now you’ve got a powerful web dashboard that you can share with everyone in your organization.

Let us see how we can use this feature.

Login to Power BI with your credentials.

PowerBI-95

From Download Menu Section choose Power BI Publisher for Excel.

Or visit Link: https://powerbi.microsoft.com/en-us/excel-dashboard-publisher/

PowerBI-96

Select your desired Excel Version 32 or 64 bit as installed on your PC and download the Package.

Close your Excel and Install the Package and follow on screen guide.

After Installation when you open your Excel First time after Installing the Package. You will get similar to below screen.

PowerBI-97

Sign in with your Power BI Credentials.

PowerBI-98

 

PowerBI-99

 

PowerBI-100

I have created a Pivot in excel as below which I want to share on my Desktop.

PowerBI-101

Select the Region/Range that you wish to publish from Power BI choose Pin, as shown below.

PowerBI-102

In my case I have already pined so confirmation Dialog Box is taken else it will Pin the Selected Range as a snapshot on selected Workspace.

PowerBI-103

Make sure you select right Workspace before you Pin.

PowerBI-104

After Publishing you will get confirmation as below.

PowerBI-105

Using the Link, Login with your credentials to the Power BI and switch to the Dashboard on which you published.

PowerBI-106

This way you can Pin Snapshot of PivotTables, Charts, cell ranges, and more. You can update existing with new one and manage all your Pins.

PowerBI-107

Save your Excel and Exit.

PowerBI-108

Try useful feature.

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

Till then keep practicing and learning using online Blogs, help and documents.

Leveraging Business Intelligence for Ad Hoc Analysis

Leveraging Business Intelligence for Ad Hoc Analysis

Video-1

 

Video-2

 

Useful Windows PowerShell cmdlets for managing Extensions in Dynamics Navision 2016

Today I will list few cmdlets which will help you getting your task done while working with Extensions.

For Overview of Extensions, please see my earlier posts

Introducing Extensions in Microsoft Dynamics NAV 2016

Which Object types you can Include & Restrictions applicable to C/AL code in Extension Packages

Which Properties are Restricted in Extension Packages

Just a quick reference you can study in details using links of MSDN below every cmdlet.

Get-Help

To get Help about syntax and options for a specific cmdlet, type the following cmdlet.

Syntax: Get-Help <cmd name>

 

Export-NAVApplicationObject

The Microsoft.Dynamics.Nav.Model.Tools.psd1 module includes a function, Export-NAVApplicationObject, which runs the ExportObjects command. This means that you can run a command such as the following:

Export-NAVApplicationObject

–DatabaseServer MyServer

–DatabaseName “Demo Database NAV (7-1)”

–Path C:\UserData\MyPackage\ORIGINAL\MyObjects.txt

 

Export-NAVApplicationObjectLanguage

Exports captions from the specified text files with Microsoft Dynamics NAV application objects. The captions are exported to text files.

 

Syntax:

Export-NAVApplicationObjectLanguage

[-Source] <String[]>

[-Destination] <String>

[[-LanguageId] <String[]> ]

[-DevelopmentLanguageId <String> ]

[-Encoding <FileEncoding> ] [-Force] [-PassThru] [-Confirm] [-WhatIf] [ <CommonParameters>]

The resulting text files are similar to the multilanguage files that you can export in the Microsoft Dynamics NAV Development Environment. If your source files contain more than one language, you can choose to export one language, multiple languages, or all languages

 

Example:

PS C:\> Export-NAVApplicationObjectLanguage

–Source .\ORIGINAL\ -LanguageId “DEU”,”FRA”

-Destination .\RESULT\languages.txt

Click here for more details on MSDN

Export-NAVAppPermissionSet

Exports the specified permission set from a Microsoft Dynamics NAV database to a file.

 

Syntax:

Export-NAVAppPermissionSet

[-ServerInstance] <String>

-Path <String> -PermissionSetId <String[]>

[-Force] [-PassThru] [ <CommonParameters>]

 

Example:

PS C:\> Export-NAVAppPermissionSet

-ServerInstance DynamicsNAV90 -Path ‘.\PermissionSet.xml’

-PermissionSetId SUPER

 

This example exports the permission set with the ID “SUPER” in the database that is used by the DynamicsNAV90 server instance to the PermissionSet.xml file.

Click here for more details on MSDN

 

Split-NAVApplicationObjectFile

Splits a text file that contains two or more application objects into separate text files for each application object.

Syntax:

Split-NAVApplicationObjectFile

[-Source] <String>

[[-Destination] <String> ]

[-Force] [-PassThru] [-PreserveFormatting] [-Confirm] [-WhatIf] [ <CommonParameters>]

 

The Split-NAVApplicationObjectFile cmdlet can copy each application object to a new file, or it can recreate the object in the new file.

The default setting is to recreate the object, but you can change this by setting the PreserveFormatting parameter.

Example:

PS C:\> Split-NAVApplicationObjectFile -Source C:\UserData\MyPackage\ORIGINAL\All.txt -Destination C:\UserData\MyPackage\ORIGINAL\TXT\ -PreserveFormatting

 

Click here for more details on MSDN

 

Compare-NAVApplicationObject

Compares text files with Microsoft Dynamics NAV application objects and then calculates the delta between the two versions. The result of the comparison is a number of text files with the calculated delta.

The Compare-NAVApplicationObject cmdlet compares the text files in the two specified folders and creates .delta files that describe the difference between the two versions

The cmdlet creates a text file for each application object that is different between the two versions.

Syntax:

Compare-NAVApplicationObject

[-OriginalPath] <String[]>

[-ModifiedPath] <String[]>

[-DeltaPath] <String>

[-Confirm] [-Force] [-Legacy] [-NoCodeCompression] [-PassThru] [-Confirm] [-WhatIf] [ <CommonParameters>]

 

Example:

PS C:\> Compare-NAVApplicationObject

–OriginalPath C:\UserData\MyPackage\ORIGINAL\*.txt

-ModifiedPath C:\ UserData\MyPackage \MODIFIED\*.txt

-DeltaPath C:\ UserData\MyPackage \DELTA

 

Below example compares the text files in the MODIFIED folder to the baseline in the ORIGINAL folder. The result of the comparison is put into the DELTA folder and also piped to the Update-NAVApplicationObject cmdlet, which applies the updates.

PS C:\> Compare-NAVApplicationObject

-OriginalPath .\ORIGINAL\*.txt

-ModifiedPath .\MODIFIED\*.txt

-DeltaPath .\DELTA -Force

-PassThru |   Update-NAVApplicationObject

-TargetPath .\TARGET\*.txt

-ResultPath .\RESULT –Force

Click here for more details on MSDN

 

Merge-NAVApplicationObject

Compares the changes that have been made to application objects between two versions of Microsoft Dynamics NAV, and applies the difference to a third set of application objects.

 

Syntax:

Merge-NAVApplicationObject

[-OriginalPath] <String[]>

[-ModifiedPath] <String[]>

[-TargetPath] <String[]>

[-ResultPath] <String>

[-DateTimeProperty <DateTimePropertyAction> ] [-DisableCommentOut] [-DocumentationConflict <DocumentationConflictAction> ] [-Force] [-Legacy] [-ModifiedProperty <ModifiedPropertyAction> ] [-PassThru] [-Strict] [-VersionListProperty <VersionListPropertyAction> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

 

You specify an original version and compare that to a latest version.

The difference is then applied to the target version.

The result of the merge is a number of text files with the merged application objects.

Any conflicts that the cmdlet cannot merge are identified in conflict files.

Example:

PS C:\> Merge-NAVApplicationObject

-OriginalPath C:\UserData\MyPackage \ ORIGINAL\*.TXT

-TargetPath C:\ UserData\MyPackage \TARGET \*.TXT

-ModifiedPath C:\ UserData\MyPackage \MODIFIED \*.TXT

-ResultPath C:\ UserData\MyPackage \RESULT\

 

Click here for more details on MSDN

 

Import-NAVApplicationObjectLanguage

Imports strings in the specified language into text files that contain Microsoft Dynamics NAV application objects.

 

Syntax:

Import-NAVApplicationObjectLanguage

[-Source] <String[]>

[-LanguagePath] <String[]>

[-Destination] <String>

[[-LanguageId] <String[]> ]

[-Encoding <FileEncoding> ] [-Force] [-PassThru] [-Confirm] [-WhatIf] [ <CommonParameters>]

Example:

PS C:\> Import-NAVApplicationObjectLanguage

–Source .\TAB18.TXT

-LanguageId “CHS”

-LanguagePath .\ALL-CHS.TXT

-Destination .\RESULT\

This command will import the CHS language into the Microsoft Dynamics NAV application object that is specified in the –Source parameter, TAB18.txt. The strings are imported from the text files in the ALL-CHS.txt file, and the result of the command is a text file in the RESULT folder, TAB18.txt, that includes captions in Chinese.

Click here for more details on MSDN

 

Get-NAVAppInfo

Gets information about a Microsoft Dynamics NAV extension based on the specified package file or the specified Microsoft Dynamics NAV Server instance.

 

Syntax:

  • Get-NAVAppInfo -Path <String> [ <CommonParameters>]

  • Get-NAVAppInfo [-ServerInstance] <String> [-CompatibilityId <Version> ] [-Id <Guid> ] [-Name <String> ] [-Publisher <String> ] [-Version <Version> ] [ <CommonParameters>]

  • Get-NAVAppInfo [-ServerInstance] <String> -Tenant <String> [ <CommonParameters>]

 

Example:

To see Microsoft Dynamics NAV extensions that are published to the DynamicsNAV90 server instance use below command.

PS C:\>Get-NAVAppInfo -ServerInstance DynamicsNAV90

Or

This command will return information about all Microsoft Dynamics NAV extensions that are published to the DynamicsNAV90 server instance by Ashwini.

PS C:\>Get-NAVAppInfo -ServerInstance DynamicsNAV90 -Publisher ‘Ashwini’

 

You will see output similar to shown below

Id Name Version Publisher
9a47a833-e22f-4812-ade314219c53 EDD1.01 1.0.0.00 Ashwini
3c88160c-e0eb-4fe1-b4f6-011e45d74b10 EDD1.02 1.0.0.01 Ashwini

 

Below command returns information about the extension with the specified name and version on the DynamicsNAV90 server instance.

PS C:\>Get-NAVAppInfo -ServerInstance DynamicsNAV90 -Name ‘EDD1.01’ -Version 1.0.0.00

Or

This command will return information about all Microsoft Dynamics NAV extensions that are installed for the tenant with the ID Tenant1 on the DynamicsNAV90 server instance.

PS C:\>Get-NAVAppInfo -ServerInstance DynamicsNAV90 -Tenant ‘Tenant1’

Or

This command will return information about all Microsoft Dynamics NAV extensions that are installed on a non-multitenant Microsoft Dynamics NAV Server instance.

PS C:\>Get-NAVAppInfo -ServerInstance DynamicsNAV90 -Tenant default

You will see output similar to shown below

Id 3c88160c-e0eb-4fe1-b4f6-011e45d74b10
Name EDD1.02
Version 1.0.0.01
Publisher Ashwini
Description Second Extension by Ashwini
Compatibility Id 1.0.0.00
Capabilities
Prerequisites
Dependencies

 

Click here for more details on MSDN

Get-NAVApplicationObjectProperty

Gets Microsoft Dynamics NAV application object properties from the specified application object text files.

 

Syntax:

Get-NAVApplicationObjectProperty [-Source] <String[]> [ <CommonParameters>]

 

Example:

PS C:\> Get-NAVApplicationObjectProperty -Source .\SOURCE\COD1.txt

Click here for more details on MSDN

 

Set-NAVApplicationObjectProperty

Sets Microsoft Dynamics NAV application object properties in the specified application object text files.

Syntax:

Set-NAVApplicationObjectProperty

[-TargetPath] <String[]>

[-DateTimeProperty <String> ]

[-ModifiedProperty <SetModifiedPropertyAction> ]

[-VersionListProperty <String> ]

[-PassThru] [-Confirm] [-WhatIf] [ <CommonParameters>]

 

You can use the Get-NAVApplicationObjectProperty cmdlet to extract information about the application objects before you change them.

Example:

PS C:\> Set-NAVApplicationObjectProperty -TargetPath C:\UserData\MyPackage\RESULT\FinalObjects.txt -VersionListProperty ” EDD1.02″ – ModifiedProperty No -DateTimeProperty (Get-Date -Format g)

Click here for more details on MSDN

 

Update-NAVApplicationObject

Applies a set of deltas to the specified application objects. The files that describe the delta are generated by the Compare-NAVApplicationObject cmdlet.

Optionally, you can use the Set-NAVApplicationObjectProperty cmdlet to change the version or other properties. Then, you use Update-NAVApplicationObject cmdlet to apply the delta to target files.

Syntax:

Update-NAVApplicationObject

[-TargetPath] <String[]>

[-DeltaPath] <String[]>

[-ResultPath] <String>

[-DateTimeProperty <DateTimePropertyAction> ]

[-DisableCommentOut]

[-DocumentationConflict <DocumentationConflictAction> ]

[-ModifiedProperty <ModifiedPropertyAction> ]

[-VersionListProperty <VersionListPropertyAction> ]

[-Force] [-Legacy] [-PassThru] [-Strict] [-Confirm] [-WhatIf] [ <CommonParameters>]

 

Example:

PS C:\> Update-NAVApplicationObject -TargetPath C:\UserData\MyPackage \TARGET\*.txt -DeltaPath C:\UserData\MyPackage \DELTA\*.txt –ResultPath C:\UserData\MyPackage \RESULT\

 

Click here for more details on MSDN

 

Get-NAVAppManifest

Loads a manifest for a Microsoft Dynamics NAV extension from an external source , such as an .xml file.

 

Syntax:

Get-NAVAppManifest [-Path] <String> [ <CommonParameters>]

 

Example:

PS C:\> Get-NAVAppManifest -Path ‘.\Manifest-EDD1_02.xml’

You will see output similar to shown below

AppId 3c88160c-e0eb-4fe1-b4f6-011e45d74b10
AppName EDD1.02
AppPublisher Ashwini
AppDescription Second Extension by Ashwini
AppVersion 1.0.0.01
AppCompatibilityId 1.0.0.00
Capabilities {}
Prerequisites {}
Dependencies {}

 

Below command gets a manifest from an XML manifest file and then passes the manifest to the New-NAVAppPackage cmdlet to create a new extension package.

PS C:\> Get-NAVAppManifest

-Path ‘.\Manifest-Proseware SmartStuff.xml’ | New-NAVAppPackage

-Path ‘ C:\UserData\MyPackage\Manifest\EDD1.02.navx’

-SourcePath ‘C:\UserData\MyPackage \NavExtensionFiles’

Click here for more details on MSDN

 

Set-NAVAppManifest

Sets one or more available properties on an in-memory manifest for a Microsoft Dynamics NAV extension.

You can then write the updated manifest object to disk by using the New-NAVAppManifestFile cmdlet. The manifest is required when you create the extension package file (.navx) using the New-NAVAppPackage cmdlet.

Syntax:

Set-NAVAppManifest

[-Manifest] <NavAppManifest>

[-CompatibilityId <Version> ]

[-Dependencies <String[]> ]

[-Description <String> ]

[-Id <Guid> ]

[-Name <String> ]

[-Prerequisites <String[]> ]

[-Publisher <String> ]

[-Version <Version> ]

[ <CommonParameters>]

 

PS C:\> Get-NAVAppManifest -Path ‘ C:\UserData\MyPackage\MANIFEST\Manifest-EDD1_02.xml’ | Set-NavAppManifest -Version 1.0.0.01 -CompatibilityId 1.0.0.00 | New-NavAppManifestFile -Path ” C:\UserData\MyPackage\MANIFEST\Manifest-EDD1_02.xml” -Force

Gets a manifest from file, sets the version property and then saves the updated manifest back to file. By setting the Force parameter, the existing file is overwritten.

Click here for more details on MSDN

 

New-NAVAppManifest

Creates a new in-memory manifest object with the specified metadata for a Microsoft Dynamics NAV extension.

Syntax:

New-NAVAppManifest

[-Name] <String>

[-Publisher] <String>

[[-Id] <Guid> ]

[[-Description] <String> ]

[[-Version] <Version> ]

[[-CompatibilityId] <Version> ]

[-Dependencies <String[]> ]

[-Prerequisites <String[]> ]

[ <CommonParameters>]

 

The manifest is required when creating the Extension package file (.navx) using the New-NAVAppPackage cmdlet.

The manifest property values can be changed using the Set-NAVAppManifest cmdlet.

 

PS C:\>New-NavAppManifest

-Name ” EDD1.02″

-Publisher ” Ashwini ”

-Description ” Second Extension by Ashwini ”

-Version “1.0.0.01”

-CompatibilityId “1.0.0.00”

-Id 3c88160c-e0eb-4fe1-b4f6-011e45d74b10

-Dependencies C:\UserData\MyPackage\APPLICATION\EDD1.01.navx

-Prerequisites Table=18, CodeUnit=80

 

 

 

AppId 3c88160c-e0eb-4fe1-b4f6-011e45d74b10
AppName EDD1.02
AppPublisher Ashwini
AppDescription Second Extension by Ashwini
AppVersion 1.0.0.01
AppCompatibilityId 1.0.0.00
Capabilities {}
Prerequisites {Table=18, CodeUnit=80}
Dependencies {EDD1.01, Ashwini, 1.0.0.00}

 

Click here for more details on MSDN

New-NAVAppManifestFile

Creates a file with metadata for a Microsoft Dynamics NAV extension package.

Syntax:

New-NAVAppManifestFile

[-Path] <String>

[-Manifest] <NavAppManifest>

[-Force] [-PassThru] [-Confirm] [-WhatIf] [ <CommonParameters>]

 

Below command will create information in-memory manifest and then writes it to disk.

Because the example sets the Force parameter, the file will be overwritten if it already exists.

 PS C:\> New-NavAppManifest  -Name “EDD1.02”  -Publisher “Ashwini”  -Description ” Second Extension by Ashwini” | New-NavAppManifestFile -Path ” C:\UserData\MyPackage\ MANIFEST \Manifest-EDD1_02.xml” -Force

Click here for more details on MSDN

 

New-NAVAppPackage

Creates a Microsoft Dynamics NAV extension package file (.navx) at the specified location based on the specified manifest file and source files.

Syntax:

New-NAVAppPackage

[-Path] <String>

[-Manifest] <NavAppManifest>

[-SourcePath] <String[]>

[-Force] [-PassThru] [-Confirm] [-WhatIf] [ <CommonParameters>]

 

You can then use the package file to deploy the extension to a Microsoft Dynamics NAV Server instance.

 

Example:

PS C:\> New-NavAppManifest -Name ‘ EDD1.02’ -Publisher ‘Ashwini’ -Version 1.0.0.01 | New-NAVAppPackage -Path ‘ C:\UserData\MyPackage\APPLICATION\EDD1.02.navx’ -SourcePath ‘ C:\UserData\MyPackage\MyExtensionFiles’

Click here for more details on MSDN

 

Publish-NAVApp

Publishes a Microsoft Dynamics NAV extension to the app catalog of the specified Microsoft Dynamics NAV Server instance.

When the extension has been published, you can install it for individual tenants.

 

Syntax:

Publish-NAVApp

[-ServerInstance] <String>

[-Path] <String>

[[-PassThru]] [[-LogPath] <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

 

 

Example:

PS C:\> Publish-NAVApp -ServerInstance DynamicsNAV90 -Path ‘ C:\UserData\MyPackage \NAVAPP\EDD1_02.navx’

Publishes the Microsoft Dynamics NAV extension from the EDD1_02.navx package to the DynamicsNAV90 server instance.

Click here for more details on MSDN

 

Unpublish-NAVApp

Unpublishes a Microsoft Dynamics NAV extension from the app catalog of the specified Microsoft Dynamics NAV Server instance.

The extension cannot be unpublished if it is currently installed for a tenant of the specified Microsoft Dynamics NAV Server instance.

 

Syntax:

Unpublish-NAVApp

[-ServerInstance] <String>

[-Path] <String>

[-Confirm] [-WhatIf] [ <CommonParameters>]

 

Unpublish-NAVApp

[-ServerInstance] <String>

[-Name] <String>

[[-Publisher] <String> ]

[[-Version] <Version> ]

[-Confirm] [-WhatIf] [ <CommonParameters>]

Click here for more details on MSDN

 

Install-NAVApp

Installs a Microsoft Dynamics NAV extension for a tenant in the specified Microsoft Dynamics NAV deployment.

Syntax:

Install-NAVApp

[-ServerInstance] <String>

-Path <String>

[-Tenant <TenantId> ]

[-DoNotLoadData]

[-Force] [-PassThru] [ <CommonParameters>]

 

 

Install-NAVApp

[-ServerInstance] <String>

-Name <String>

[-Publisher <String> ]

[-Tenant <TenantId> ]

[-Version <Version> ]

[-DoNotLoadData]

[-Force] [-PassThru] [ <CommonParameters>]

 

Example:

PS C:\> Install-NAVApp -ServerInstance DynamicsNAV90 -Name ‘EDD1.02’ -Version 1.0.0.01 -Tenant ‘MyTenant’

 

Click here for more details on MSDN

 

Uninstall-NAVApp

Uninstalls a Microsoft Dynamics NAV extension for the specified tenant.

If other extensions have a dependency on the specified extension, you must specify if they must also be uninstalled. Set the Force parameter to automatically remove dependent extensions.

Syntax:

Uninstall-NAVApp

[-ServerInstance] <String>

-Path <String>

[-Tenant <TenantId> ]

[-DoNotSaveData] [-Force] [-PassThru] [ <CommonParameters>]

 

 

Uninstall-NAVApp

[-ServerInstance] <String>

-Name <String>

[-Publisher <String> ]

[-Tenant <TenantId> ]

[-Version <Version> ]

[-DoNotSaveData]

[-Force] [-PassThru] [ <CommonParameters>]

 

 

Example:

PS C:\> Uninstall-NAVApp

-ServerInstance DynamicsNAV90

-Name ”EDD1.02′

-Version 1.0.0.01

 

Click here for more details on MSDN

 

Get-NAVAppTenant

Gets a list of tenants where the specified Microsoft Dynamics NAV extension is installed.

You can specify the extension by name, publisher, or version.

You can use the returned list of tenants to apply general changes, such as uninstalling the extension for all tenants that currently have it installed.

 

Syntax:

Get-NAVAppTenant

[-ServerInstance] <String>

-Path <String>

[ <CommonParameters>]

 

 

Get-NAVAppTenant

[-ServerInstance] <String>

[-Name <String> ]

[-Publisher <String> ]

[-Version <Version> ]

[ <CommonParameters>]

 

 

PS C:\> Get-NavAppTenant -ServerInstance DynamicsNAV90 -Name ‘EDD1.02’ -Version 1.0.0.01 | Uninstall-NAVApp -ServerInstance DynamicsNAV90 -Name ‘EDD1.02’ -Version 1.0.0.01

Click here for more details on MSDN

 

Repair-NAVApp

Repairs a Microsoft Dynamics NAV extension by recompiling it against the current base application.

It is recommend that you restart the Microsoft Dynamics NAV Server instance after running the repair.

Syntax:

Repair-NAVApp

[-ServerInstance] <String>

[-Name] <String>

[[-Publisher] <String> ]

[[-Version] <Version> ]

[ <CommonParameters>]

 

 

Example:

PS C:\> Get-NAVAppInfo -ServerInstance DynamicsNAV90 | Repair-NAVApp

Click here for more details on MSDN

 

 

How do I: Enable the Invoice Rounding Function

If you want your sales and purchase invoices are rounded automatically, you will have to activate the invoice rounding function.

To activate the invoice rounding function

  1. In the Search box, enter Sales & Receivables Setup or Purchases & Payables Setup, and then choose the related link.
  2. On the General Fast Tab, select the Invoice Rounding check box.

InvoiceRounding-4

InvoiceRounding-5

You can activate invoice rounding separately for sales and purchase invoices.

How do I: Set Up Rounding Rules for Foreign Currency

To use the automatic invoice rounding function, you must set up rounding rules.

To set up rounding rules for foreign currency

  1. Open the Currencies
  2. In the Currencies window, fill in the Invoice Rounding Precision and Invoice Rounding Type For more information on specific field, select the field, and then press F1.

InvoiceRounding-3

Previous Older Entries

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: