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

Formula Field Breaks When Packaged - Namespace

I have a formula field that that works fine in test, but when I generate the managed package, the references to namespace are not properly embedded into the formula.  Further, when I view the formula field is see the word "disable" at the end of the formula definition:


IF( ISNULL(ExpectedPaymentDate__c) ,
Invoice_Due_Date__c + ceiling(Account__r.Average_Days_Delinquent__c),
Invoice_Date__c + ceiling(Account__r.Average_Days_To_Pay__c)
) ,


Note that the formula references a custom setting (called ForsevaPreferences__c) .  The custom setting is properly prefixed with the namepace( "forseva2").  However,  the custom fields used within the formula do not have the prefix.


Note that other formula fields that we have defined properly prefix everything with the namespace.  They are different in that they do not reference a custom setting.  Can anyone tell me why this is happening?





I had this happening to me before ,what i did was include the NAMESPACE in the formula, it will work OK in the ORG that has the managed package, and whatever org you install the package in.


If you are using a sandbox then deploying to production and from production making the manage package, you should have 2 formulas one for sandbox (no namespace) and one for production/package (with namespace)