More on Customizing the Clarify Attachment Form (form 1006)

Last year I had to do some customizing of the Clarify attachment form (form 1006) for a customer. This is one of those old-school forms that doesn’t always behave very well with ClearBasic. I shared some of my findings and solutions on customizing this form.


I had a new request come up this week. How do I enable a user to add an attachment on a case that they don’t own?

Plan A


The first thought was simply to enable the buttons on the form.


Sub Form_Load()
    FILE_BTN.Enabled = TRUE
    ADD_BTN.Enabled = TRUE
End Sub


The buttons were now enabled, but clicking the Add button raised an error, ” ‘{CurrentOwnerLoginName} is now the owner, therefore the ‘Save’ operation cannot be completed.”


image001 (5)



Plan B


There’s a bug that exists in most versions of Clarify, where the drag and drop functionality still seems to work, even if the current user is not the owner.


So I can open windows explorer, and drag and drop a file onto the filebox, and that adds the attachment. So let’s exploit this bug.


You could give some guidance and help in making this operation easier for the user, such as this:




And the code for this is simple:


Sub Form_Load()
End Sub

Sub lbl_explorer_click()
    Dim taskID As Variant 
    taskID = Shell("explorer.exe ") 
End Sub


Now any user can drag and drop an attachment onto a case, even if they don’t own it. And by giving them a link to open Windows Explorer, we’ve made it easier for them to do so.

Plan C


The other thing you could consider is to replace that functionality with your own web page, using a browser control on the attachments form.


Then, you get full control of all the functionality.


Bonus: You get to control where the uploaded file goes to. Meaning you could upload it to your attachments server as opposed to allowing attachments with a local path (such as a user’s C drive)


This is an example from a demo I did a while back.  I hacked up the attachment pages from Dovetail Agent as a proof of concept:




More than one way to tackle the problem at hand.



The attachment form is certainly a tricky form to customize. Hopefully some of my experiences in this area will help should you have to customize this form yourself.

Rock on.