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
ketan vinodrai mehtaketan vinodrai mehta 

Mamaged Package namespace prefix change issue.

Hi,
   We are using a managed package and using standard controller, lables etc from the same in our custom pages/controller using namaspace prefix. So whenever we install a new version of the same package, the namespace get chaged and hence the existing code will break. Is there any permanent solution to this issue? 
Akhil AnilAkhil Anil
Hi Ketan,

You can create a custom setting to store the namespace and refer the namespace through the custom setting in your code. That way you don't have to change the every single line of your code when the managed package upgrades. Just change the value in your custo setting and your code should be good.

Hope that helps !
ketan vinodrai mehtaketan vinodrai mehta
Hi,
  Can you provide an example in the following contexts (highlighted are the namespace name):
1) Using standard controller from managepackage:
<apex:page standardController="ACSFUL001__Promotion__c" extensions="UL_CreatePromotionController" title="{!$ObjectType.ACSFUL001__Promotion__c.label} {!$Label.ACSFUL001__EDIT}: {!$Label.ACSFUL001__NEW} {!$ObjectType.ACSFUL001__Promotion__c.label}">

2) Using button text:
<apex:commandButton id="btnSave" value="{!$Label.ACSFUL001__SAVE}" action="{!save}"/>

Thanks in advance,