API 31.0 breaking change in namespaced Visualforce $Setup global

Has anyone encountered this problem when evaluating $Setup global variable in Visualforce?

If, in an organization with a namespace prefix, I have a hierarchy Custom Setting like the following,
it compiles and renders without exception, except that the output value is null

<!-- evaluates and outputs null -->
{!$Setup.Object__c.Field__c}

Now if I want the custom setting to resolve correctly, I have to fully qualify the Object Name and Field Name, and I believe this is new behaviour:

<!-- evaluates and outputs actual intended value -->
{!$Setup.namespace__Object__c.namespace__Field__c}

This means you can no longer use the same codebase in Development and Release environments… you would need to tokenize/replace the namespace prefix when deploying to the appropriate variant.

I’ve tried dynamically dereferencing the field: $Setup['Object__c']['Field__c'] to no avail.

Any ideas what causes this regression and how we fix it?

Answer

The issue your facing seems to be related to the following known issue which will be fixed in winter 15 release.
https://success.salesforce.com/issues_view?id=a1p30000000T5P9AAK

Attribution
Source : Link , Question Author : Matt and Neil , Answer Author : nevrekar_amey

Leave a Comment