I found code posted on another test blog site that works in ALM11 (courtesy of MrGreen999) and modified it for our environment
http://eyeontesting.com/questions/2595/quality-center-10-test-instance-defect-linkage.html
------------------------------------
Add to the "ActionCanExecute"
if ActionName = "StepsView.NewDefect" Then
Set us = TDConnection.UserSettings
us.Open "MySettings"
us.Value("LastTestInstanceID") = TestSetTest_Fields("TC_TESTCYCL_ID").Value
us.Close
us.Post
Set us = Nothing
End If
if ActionName = "act_end_run" or ActionName = "RfrshAct" Then
Set us = TDConnection.UserSettings
us.Open "MySettings"
us.DeleteValue "LastTestInstanceID"
us.Close
us.Post
Set us = Nothing
End If
------------------------------------
Add to Bug_AfterPost
Set us = TDConnection.UserSettings
us.Open "MySettings"
lTestID = us.Value("LastTestInstanceID")
BugID = Bug_Fields("BG_BUG_ID").Value
us.Close
if lTestID <> "" Then
Set td = TDConnection
Set objTCtestFac = td.TSTestFactory
Set ojbTCtest = objTCtestFac.Item(lTestId)
Set objBugLinkFac = ojbTCtest.BugLinkFactory
Set objLink = objBugLinkFac.AddItem(BugID)
objLink.LinkType = "Related"
objLink.Post
End If
Set us = Nothing
Set lTestID = Nothing
Set BugID = Nothing
---------------------------------------
Important to note that this will end up creating a duplicate link that is attached to the Test Instance.
The code can be amended to also create a link at the Test Run level in case anyone has a need to show a link icon in the Runs report on the "Test Instance Details" screen. ("TC_TEST_ID" instead of "TC_TESTCYCL_ID")