Advertisements

Image Analysis feature in Dynamics NAV 2018

In Dynamics NAV 2018, the Image Analyzer extension uses the Computer Vision API to analyze images that are attached to contact persons and items.

For example, this is useful for items because it lets you build up a stockpile of metadata about what you sell and use it to fine-tune search results when someone is browsing your web shop.

Image Analyzer is free in Dynamics NAV, but there is a limit to the number of items that you can analyze during a certain period of time. By default, you can analyze 100 images per month.

After you enable the extension, Image Analyzer runs each time you import an image to an item or contact person. You will see the attributes, confidence level, and details right away, and can decide what to do with each attribute. If you imported images before you enabled the Image Analyzer extension, you must go to the item or contact cards and choose the Analyze Picture action.

Requirements

There are a few requirements for the images:

  • Image formats: JPEG, PNG, GIF, BMP
  • Maximum file size: Less than 4 MB
  • Image dimensions: Greater than 50 x 50 pixels

How to enable Image Analyzer

To enable the Image Analyzer extension, do one of the following:

Method-1 : Open an item or contact card. In the notification bar, choose Analyze Images, and then follow the steps in the assisted setup guide.

 

IA-1

This will launch Image Analyser assisted setup guide, follow the step.

 

IA-2

IA-3

IA-4

Once you are done It will import your image for Analysing.

IA-5

 

Method-2 : Access the Service Connections, and then choose Image Analysis Setup.

IA-5.1

Choose the Enable Image Analyzer check box, and then complete the steps in the assisted setup guide.

IA-5.2

For URL and Key follow these steps:

Click on Computer Vision API Documentation

IA-6

Click on Try Computer Vision API

IA-7

Select your API Computer Vision API and then Get API Key

IA-8

Agree to T & C select your Country/Region and then Next

IA-9

Sign-In with the preferred account sign-in method

IA-10

Once done you will land on page which will have your Endpoint URL and Key

You must add /analyze at the end of the API URI, if it isn’t already there.

IA-11

Enter your Endpoint URL and Key and close the window.

IA-12

Now you import your Image, or select Analyze Picture if already imported

IA-13

This will analyze the Image and provide you with the Attributes.

The Image Analyzer Attributes page displays the detected attributes, the confidence level, and other details about the attribute. Use the Action to perform options to specify what to do with the attribute.

 

This is how you enable and configure your Image Analyzer Service.

 

To see how many analyses you have left in the current period

You can view the number of analyses you’ve done, and how many you can still do, in the current period.

Enter Image Analyzer Setup, and then choose the related link.

The Limit type, Limit value, and Analyzes performed provide the usage information.

 

To stop using the Image Analyzer extension

Enter Service Connections, and then choose Image Analyzer Setup.

Clear the Enable Image Analyzer check box.

 

I will come with more details as I proceed.

 

 

 

Advertisements

How do I: Develop an Extension

You can build extension packages that add functionality to a Microsoft Dynamics NAV deployment.

For Overview, please see my earlier posts Introducing Extensions in Microsoft Dynamics NAV 2016

Like any common functionality you want to roll out to different locations of a same company maintaining Object Set Globally for their Navision deployment.

You can perform conventional Export object and send to different locations, where they import these objects in their databases. Another option is through Extensions. Specially very helpful in Tenant model deployment.

But do the limitations apply as we discussed in my earlier post:

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

[B] Which Properties are Restricted in Extension Packages

Unlike the familiar development and deployment of Microsoft Dynamics NAV functionality, building an extension relies on the exported version of an application to .TXT files.

You can export the application from the development environment, use the development environment commands, or use the Windows PowerShell cmdlet that is available in the Microsoft Dynamics NAV 2016 Development Shell,

Export-NAVApplicationObject.

MS recommend that you create a folder structure that can be leveraged by the cmdlets that you use when you build the extension package. That structure should contain folders for the ORIGINAL object files, MODIFIED object files, and DELTA files. These names match those used as parameters in the application merge utilities.

Recall from my earlier post where we deled with Upgrading the Application Code in Microsoft Dynamics NAV 2016

We used folder structure for placing the objects before we performed action:

“In my example, the UpgradeDemo folder on the C drive contains five folders: ORIGINAL, MODIFIED, TARGET, DELTA, and RESULT. The DELTA and RESULT folders are empty. The ORIGINAL, MODIFIED, and TARGET folders contains one or more text files that contain application objects.”

Similar structure we will be using for creating package. You can follow same for easy reference or you can use your convenient naming convention and structure.

I will come back on this in my future post, what exactly structure I will be using for my walkthrough on Extension.

You can refer to cmdlets we discussed earlier for upgrade and extensions which will be used in rest of the parts of this and upcoming posts while dealing with Extensions.

[A] Helpful PowerShell Commands which you can use for Upgrade Process in Navision 2016

[B] Few Helpful PowerShell Commands which you can use for Upgrade Process in Navision 2016 – Part 2

[C] Useful Windows PowerShell cmdlets for managing Extensions in Dynamics Navision 2016

 

5 Steps To create an extension

  1. Establish the BASE as TXT files.
  • The foundation for your extension is the exported .txt files of the objects you are modifying.
  • You can export just the objects that you want to modify, or you can export the entire Microsoft Dynamics NAV application.
  • In the Microsoft Dynamics NAV 2016 Development Shell, the Export-NAVApplicationObject cmdlet can automate this process or you can use the export functionality in the development environment.
  • The following example uses this cmdlet to export objects to establish the base for the planned modifications.

Export-NAVApplicationObject -Path ORIGINAL -DatabaseName MyDatabase -DatabaseServer MyDatabaseServer

  • Objects must be exported as .TXT files. You cannot build an extension based on a .FOB file.
  • If you use a source control system, you may want to pull the base .TXT files from there.
  1. Create functionality in the development environment.
  • Use the development environment as usual to create new objects or modify ones to the extent your license allows you.
  • Also don’t forget to reference limitations with Extensions Property and Objects which you can include in Extensions, see above provided link for more details.
  • Keep in mind the following rules as discussed earlier:
  • DO NOT make C/AL code modifications
  • DO use subscribing to events to execute code.
  • DO NOT create new or modified XMLPorts, Queries, or Report.
  • DO NOT change restricted page and table properties.
  • In order to get an easy upgrade experience for your extensions, you cannot modify code the way you do in the traditional customization process.
  • Instead, you extend Microsoft Dynamics NAV functionality by subscribing to programming events that are raised either explicitly in code, or implicitly by the platform.
  • Test your application with the extension added.
  1. Export your changed and added application objects to .TXT files.
  • Export all objects that you added or modified to .TXT files.
  • Use the same export cmdlet from step 1 or manually export within the development environment.
  • They must also be exported as .TXT files and should be placed in a separate directory so that the packaging process can be pointed at them.

Export-NAVApplicationObject -Path MODIFIED -DatabaseName MyDatabase -DatabaseServer MyDatabaseServer

  1. Create DELTA files using the Microsoft Dynamics NAV 2016 Development Shell cmdlets.
  • Extension packages are based on application object deltas. Again, you use the application merge utilities in the Microsoft Dynamics NAV 2016 Development Shell to distil the changes in the form of application object differences that are stored in DELTA files.
  • Creating an extension uses many of the same concepts and tools as you know from application object deltas. You use the Compare-NAVApplicationObject cmdlet to create these delta files.

Compare-NAVApplicationObject -OriginalPath ORIGINAL -ModifiedPath MODIFIED -DeltaPath DELTA

Your delta files must be one-to-one with the objects you have added or modified. You cannot include a single merged delta file. If you output your export file as a single file use the Split-NAVAppplicationObjectFile cmdlet to create the individual files.

  1. Build the extension package.

 

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

Which Properties are Restricted in Extension Packages

For Overview, 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

Restricted Properties on Existing Page Modifications

You cannot change the values for the following properties for existing Microsoft Dynamics NAV pages in an extension.

  • AccessByPermission
  • AssistEdit
  • AutoSplitKey
  • CardPageID
  • CharAllowed
  • ContainerType
  • ControlAddIn
  • Data Type
  • DataLength
  • DateFormula
  • DelayedInsert
  • DeleteAllowed
  • DrillDown
  • DrillDownPageID
  • Editable
  • ExtendedDatatype
  • FieldClass
  • GroupType
  • ID
  • InsertAllowed
  • LinkedObject
  • Lookup
  • LookupPageID
  • MaxValue
  • MinValue
  • ModifyAllowed
  • MultipleNewLines
  • Name
  • NotBlank
  • Numeric
  • PageType
  • PartType
  • PasteIsValid
  • Permissions
  • PopulateAllFields
  • RefreshOnActivate
  • SourceExpr
  • SourceTable
  • SourceTableTemporary
  • SourceTableView
  • SubType
  • SystemPartID
  • TableRelation
  • TableType
  • TestTableRelation
  • ValidateTableRelation
  • ValuesAllowed

Most of these are typically not properties changed through customization as they can have a negative effect on the Microsoft Dynamics NAV deployment.

 

 

Restricted Properties on Existing Table Modifications

You cannot change the values for the following properties for existing tables and fields in an extension.

Table Properties Field Properties
  • Name
  • DataPerCompany
  • Permissions
  • LookupPageID
  • DrillDownPageID
  • PasteIsValid
  • LinkedObject
  • TableType
  • Name
  • AccessByPermission
  • Compressed
  • Data Type
  • DataLength
  • DateFormula
  • ExtendedDataType
  • FieldClass
  • MaxValue
  • MinValue
  • NotBlank
  • Numeric
  • Owner
  • SQL Data Type
  • SubType (BLOB)
  • TableIDExpr
  • TableRelation
  • TestTableRelation
  • ValidateTableRelation
  • ValuesAllowed Width

You can add table keys, but you cannot delete or modify existing keys.

You can add fields to a table group, but you cannot remove fields or groups.

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

For Overview, please see my earlier post Introducing Extensions in Microsoft Dynamics NAV 2016

When you create extension package you can include new as well as modified objects.

In Microsoft Dynamics NAV 2016, these object types can be added and included in an extension:

  • Pages
  • Tables
  • MenuSuites
  • Codeunits

You can modify these existing object types as permitted by your license:

  • Pages
  • Tables
  • Action Items

You will not be able to add or modify any other object types in this version.

You are not allowed to delete any existing objects.

You will also need to be sure not to modify any existing C/AL code, including code in codeunits and in triggers on existing objects.

In case you want to modify existing code, use the new C/AL eventing model.

To know more about Events see by earlier posts:

  1. Events in C/AL Navision 2016
  2. Implementing Events in Navision 2016

This restriction is only on existing code and objects. However New pages, tables, and so on, can contain C/AL code as it is considered part of the new object.

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: