Microsoft Dynamics™ NAV – Show picture in Item Card

Home Microsoft Dynamics Nav TopicsMicrosoft Dynamics™ NAV – Show picture in Item Card
Microsoft Dynamics™ NAV – Show Item Picture

Microsoft Dynamics™ NAV – Show picture in Item Card

1 Comment

Microsoft Dynamics™ NAV – Show picture in Item Card.

Probably, you are interested in show one or more item pictures for example, in item card of Microsoft Dynamics™ NAV, without import a BLOB content in the database, this means, importing it on real time from a network path. In this post, we show you an easy way to do this!

In order to show the picture, we need to modify the following objects:

Table 313 – Inventory Setup. Add a field to specify the folder path where we are going to keep all item pictures.

  • Field No.: 50000
  • Field Name: Item Images Repository Path
  • Data Type: Text
  • Length: 250
  • Description: // EBOXESFACTORY – Item Images Repository Path

Table 27 – Item. Add a field to specify the product picture name (Picture size, must be equal to size of object PictureBox (defined below!) and picture type must be “.bmp”).

  • Field No.: 50000
  • Field Name: Item Image
  • Data Type: Text
  • Length: 250
  • Description: // EBOXESFACTORY – Item Image Name

Form 30 – Item Card. Add an object type PictureBox to show the item picture.

The main properties of this object are:

  • Width: 2500
  • Height: 2500
  • VertGlue: Bottom
  • SourceExpr: Picture (we are using the standard BLOB field “Picture” in this example!)

Once we are informed the values for the new fields “Item Images Repository Path” – table “Inventory Setup” and field “Item Image” in selected products, we need to include the following C/AL code in form “30 – Item Card” on trigger “OnAfterGetRecord()”:

//>>> EBOXESFACTORY: Retrieve item image. **
   IF "Item Image" <> '' THEN
      FilePath := '';
      FilePath += TInvSetup."Item Images Repository Path";
      FilePath += '\'+"Item Image";
      FilePath := CONVERTSTR(FilePath,'/','\');
      ResImport := Picture.IMPORT(FilePath);
      IF ResImport = '' THEN MESSAGE('Check Product Image path & name!');
//<<< EBOXESFACTORY: Retrieve item image.

** We must define the following local variables:

  • Name: TInvSetup
  • DataType: Record
  • Subtype: Inventory Setup
  • Length:
  • Name: FilePath
  • DataType: Text
  • Subtype:
  • Length:  1000
  • Name: ResImport
  • DataType: Text
  • Subtype:
  • Length: 1000


The result will be like this:

Insert a picture on item card - Microsoft Dynamics NAV

  • psychics bible


    I think your internet site
    has really outstanding material. Microsoft Dynamics™
    NAV – Show picture in Item Card | write-up is an impressive instance.

Leave a Reply

Your email address will not be published. Required fields are marked *