function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
santoshsantosh 

Formula field broken from package

Hello,
 
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.
A_SmithA_Smith
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.

Thanks,
Andrew