+ Start a Discussion

Formula field broken from package

I had an app that used a formula field referencing a custom link id and a document id.
I packaged this in an earlier version (Summer '09, I guess), and everyone was able to use it fine from the AppExchange with their formula fields getting updated with the correct link id and document id frorm their ORG's after download.
On the current version, Winter '09, this no longer seems to happen and the formula field does not get re-written with the correct ids. Please help.
Thanks in advance.
Hi Santosh,

I would suggest linking to a visualforce page from your formula field with the syntax: "/apex/MyNS__MyVFPage". Use the visualforce page as a redirector to navigate to the appropriate URL (not sure if that's a document or custom link). You will probably have to use a custom controller to query for the document ID based on the document's developer name and namespace prefix (if this is a managed package). As a best practice, you should never hard code an ID into any code or formula.

In a future release, we should have a better way for you reference these items by name from a formula without using a visualforce page.