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
kevincckevincc 

Referencing a controller extension that has a namespace

Hi,

I'm trying to create a visualforce page and reference an extension that is located in a managed package and has a namespace "nsp".  Note: the visualforce page is not in the managed package.  The visualforce page looks like this:

 

 

<apex:page standardController="Account" extensions="nsp__testextension">

    
</apex:page>

 

However when I try to save the above the error is "Error: The name can only contain underscores and alphanumeric characters. It must begin with a letter and be unique, and must not include spaces, end with an underscore, or contain two consecutive underscores." 

 

The controller extension looks like this:

 

global class ControllerExtension{
    
    global ControllerExtension(ApexPages.StandardController stdController) {
    
    }


    @RemoteAction
    global static String helloWorld(String recordId) {
    
        return 'Record id in context: '+recordId;
    
    }
    
}

 

 

 

Are extensions with namespace supported?

 

 

 

 

Best Answer chosen by Admin (Salesforce Developers) 
Vinita_SFDCVinita_SFDC

Hello,

Try referencing as:

extensions="nsp.testextension"