« January 2018 | Main

February 2018

Written by Richard on February 13, 2018

How to Dynamically Interact with VISUAL from another application

There are many options and paths you can take to integrate VISUAL to your other business applications.  Some are easy, and some are not so easy.... some may involve 3rd party integration tools/services and some may require custom programming with APIs and BODs. 

However, there is one way where Infor couldn't make it any easier to integrate....

 Infor VISUAL ERP - Integration

...using a VMX file!

Yup!  That's right, a VMX file....but a "special" VMX file 

I written posts in the past on VMX files....in fact, I wrote one a couple of weeks ago where you can use a VMX as a way to have VISUAL start up with your default windows after signing in.

In this case, we can use a VMX file to interact/interface with VISUAL from another application.  It involves creating a VMX file on the fly based on end-user contextual request on demand...I may have made that terminology up...lol...not sure if that really means what I trying to explain.

Here's an example...

You could have an excel file with a list of parts where you can click on a cell containing a Part ID to call up VISUAL's Material Planning Window for the demand and supply of that specific part - without having to leave Excel.  This can be done behind the scenes using simple (more or less) VBA code that creates the VMX file and executes it.

Here's a visual of it in action

Infor VISUAL ER{P - Integration
Double Click on Image for a better visual.


Let me walk you through it

We're going to create an Excel file with a list of parts that when you select a cell/row - it will open VISUAL Material Planning Window for that specific part.

Now I'm using Excel for my walk through - because it's easy and everyone uses Excel.  But you can do this with any application where you can program simple code to create a VMX file based on user input.

Assuming we are on VISUAL 9 - (if you are not on Visual 9 - why aren't you?)

  1. Create an Excel File containing a list of parts with the following columns:
    • Column A: Site ID (required)
    • Column B: Part ID (required)
    • Column C: Description
    • Column D: UM
    • Column E: Qty

  2. Be sure to populate the list with parts starting on Row 2
  3. Open the Visual Basic module of Excel (under the Developer Tab).  If you don't have the Developer Tab - you will need to enable it - go to File > Options.
  4. Insert the following code in the SelectionChange event/procedure of the worksheet.

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)

    Dim VMPath As String
    Dim VMXPath As String
    Dim PartID As String
    Dim SiteID As String

    'Path to your VISUAL executable file - VM.EXE
    VMPath = "{VISUAL Executable Directory}\VM.exe"

    'Path to where you want to create your VMX file. You would typlically want
    'this to be in your VISUAL local directory
    VMXPath = "{local Directory Path}\VISUAL.VMX"

    If Selection.Count = 1 Then

       If Target.Row > 1 Then
          Set objShell = VBA.CreateObject("Wscript.shell")

          PartID = Range("B" & Target.Row).Value
          SiteID = Range("A" & Target.Row).Value

          'Create the VMX file to open VISUAL Material Planning Window
          Set filesys = VBA.CreateObject("Scripting.FileSystemObject")
          Set filetxt = filesys.CreateTextFile(VMXPath, True)
          filetxt.WriteLine ("LSASTART")
          filetxt.WriteLine ("VMPLNWIN~" & SiteID & "~" & PartID)
          filetxt.Close

          'Drilldown into VISUAL using VMX file
          objShell.Exec ("""" & VMPath & """ """ & VMXPath & """")
          objShell.AppActivate ("Material Planning Window - Infor VISUAL")

          'Focus back to Excel
          Application.Wait (Now + TimeValue("0:00:02"))
          AppActivate ThisWorkbook.Application.Caption
       End If

    End If

    End Sub


    It may look like a lot of code....but it's not.

    Be sure to replace directory highlighted in RED to your environment.
  5. You can exit out of the Visual Basic module and return to Excel.
  6. You are good to go.

Click away on any row with a part and you should see VISUAL dynamically respond.

If the above steps are too involved....you can download the example excel file for your convenience

Let me know what you think.
  

 

WHO IS VISUALNUGGETS?

Richard Ferlatte
Results Driven VISUAL Specialist

ONLINE VISUAL WORKSHOPS

Taking it to the next level and designing a program around "Hands On VISUAL Training".

Check them out - there's sure to be one to interest you!

Operational Workshops
Reporting Workshops
Financial Workshops
Inventory Workshops
Quality Workshops

VISUAL EXTENSIONS

BOM Xploder
Drastically improve your BOM visibility and discover shortages at ANY level of your bill of material no matter how deep.
SmartViews
See, analyze, and track information that helps you better support individual, departmental, and your company’s performance metrics and goals.
Credit Card Integration
Easily accept and process credit card payments right from within VISUAL.
CAD Integration with CADLink
Reduce rework, minimize scrap, and work more efficiently with CADLink - a fully automated, two-way connection between VISUAL and your CAD system.
Sales Tax Automation with AvaTax
Easily automate sales and use tax in VISUAL with AvaTax. No more manually entering data or uploading rate tables and tax information.
Workforce Management with Kebrite Solutions
Streamlines the collection of Job, Labor, Payroll, Time & Attendance, and a vast array of HR related data-- with live VISUAL integration.
ACH Document Processing
Leveraging VISUAL's payment scheduling and batch payment functions, with the added convenience, performance, and security of Electronic Funds Transfer payment processing.