<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=457952864579063&amp;ev=PageView&amp;noscript=1">
blog-banner-macola-tag.png

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

Topics: Macola 10, Document Management, workspaces

Posted on Jan 27, 2016 4:00:00 PM by Exact Macola

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,

       b.HID,

       b.Version,

       a.AttachmentFileName,

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

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

FROM

--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:

 

simpletable.jpg

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:

 

workspacemenu.jpg

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

documentexample.jpg

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

 

menuitem.jpg

DocBinBlob.aspx?Download=1&ID={1}&AttID={2}&Version={3}

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

 

openattachment.jpg

 

You will be prompted to open or save the attachment:

openorsave.jpg

 

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

On Demand Webinar

Watch the webinar

Subscribe to Email Updates

Are you evaluating  ERP software?

Recent Posts

Posts by Topic

see all