Exact Macola 10 Tech Tip: How to Link Documents to a Workspace

Topics: Exact Macola 10, Document Management, Workspaces

Posted on Jan 27, 2016 4:10:32 PM by David Dozer

In the previous tech tip we showed you how to setup a document type to store engineering drawings. Today we will explain how to link that specific document to a workspace.

First we need to get our data lined up. So let’s look at a simple query that gives us our items linked to the current active version of the document type we setup last time. Please note this is just a sample of the tables that you want to join in order to get the data you need to link directly to the attachment from your active document version:


SELECT i.ItemCode,




       convert(varchar(256),a.Entity) AS Entity,

       convert(varchar(256),a.ID) AS AttachmentID


--select from items table

       items i 

--join to documents

       LEFT OUTER JOIN bacodiscussions b ON i.ItemCode = b.ItemCode

--join to versions table

       LEFT OUTER JOIN BacoDiscussionVersions bv ON b.Version = bv.Version

              AND convert(varchar(256),b.id) = convert(varchar(256),bv.DocumentID)

--join to attachments table

       LEFT OUTER JOIN Attachments a ON convert(varchar(256),bv.DocumentID) = convert(varchar(256),a.Entity)

              AND b.Version = a.VersionID

--filter down to the example from the previous tech tip

WHERE b.type = 1000010 --this is your type ID from your document type setup

AND i.ItemCode = 'bikepp' --this is the sample item we used last time


Next you will add the query to your dataset in SSRS. In our example we are creating a simple table from our query:




Next we will configure the menu function on the ItemCode field. Make sure you add Entity, AttachmentID and Version as available values:


=UFssrsCA.CAFunctions.ContextualMenu("AttachmentTest",Variables!ReportID.Value,Parameters!Division.Value, Fields!Entity.Value, Fields!AttachmentID.Value, Fields!Version.Value, "") 


Save your report and deploy to your Exact Macola 10 environment. You’ll have the following menu:




Now open the document you created in the first blog post and right click on the Download link and go to properties:




Copy the URL and then configure your workspace menu. Replace the values in the URL with the values from your menu parameters:





You’ll now have a menu pick that takes you directly to a version controlled attachment!




You will be prompted to open or save the attachment:





In a few simple steps you’ve now incorporated dynamic links to attachments stored in the Exact Macola 10 document management system into your workspaces!


The ERP Blog covers the impact of Enterprise Resource Planning (ERP), business software and accounting solutions on organizations in the manufacturing and distribution industries.

On Demand Webinar

5 Reasons To Use Automated Workflows in Your ERP Solution

Watch the Webinar


Subscribe to Email Updates

Are you evaluating  ERP software?

Recent Posts