+ Start a Discussion

Determine the URL for overriden standard links for objects through Apex

I am writing an auditing tool that takes an incoming URL (Example:  https://instance.salesforce.com/apex/CustomAuditTool?url=...) and would like to report if the user accessed a "tab", "view" or "edit" page for an object based on the URL passed in to a controller.  This is relatively easy if the URL follows the standard pattern of ".../{Prefix}/o", ".../{ID}" or ".../{ID}/e", however, our org uses custom Visualforce pages to handle the display and editing of records (e.g. ".../apex/AccountCustomTab", ".../apex/AccountCustomView?id={ID}" and ".../apex/AccountCustomEdit?id={ID}").


Is there a way, given an sObject, to determine if the standard links for that object have been overridden by Visualforce pages?  I've looked at DescribeSObjectResult but that doesn't seem to provide what I need.


Ideally I'd like to retrieve the URL for the Visualforce page of overridden links.  Example:  Account "View" link is overridden by "/apex/AccountCustomView".  Or, is there a way that I can get a map of Visualforce pages that override standard links?