Where is the link located? Is it within correspondence rule? If yes, you can use "Worklink" as the format for pyID included within the correspondence rule as mentioned in the above reply. If the link is within Pega, you can configure action on the link to open work item.
How are you opening the work object? From correspondence rule? If you set SSO URL to Public Link URL under System -> Settings -> URLs and use pxWorkLink in your correspondence rule, you should be able to open the work object using the SSO URL from correspondence. If you just want to construct a URL that would open the work object, check out the code in pxWorkLink control.