@Sage100AdvancedScripting
The conditional part of the script can be one of these:
1) If oSession.StartProgram = ""IM_ITEMINQUIRY_UI"" Then
2) If oSession.SecurityAccess = 0 Then
But you also want to explicitly add Else condition to Show back the link. The event will be either Table Post-Read or UI Panel PostLoad (av on 2015+). Putting it all together it could be something like this:
`If oSession.SecurityAccess = 0 Then
retVal = oScript.SetUIControl(""BT_LINK_1"", ""HIDE"") 'Use the correct BT_LINK number
Else
retVal = oScript.SetUIControl(""BT_LINK_1"", ""SHOW"")
End If`