Questions tagged [namespace]

Although namespaces are not available for use in Apex code, they are used by the system to segregate components which are part of managed packages.

Filter by
Sorted by
Tagged with
34
votes
4answers
7k views

Namespace Prefix in JavaScript and Apex within Installed Package

When you have a dedicated Visualforce Page and can use modern JavaScript Remoting techniques, this is seldom an issue. But I'm looking at some historical code in a managed package like this: {!...
28
votes
1answer
10k views

Getting “__r” relationship name from Schema.SObjectType.Fields

Say I have a master-detail relationship between two objects, Schematic__c and Part__c. I can SOQL query the master from the detail: [SELECT Schematic__r.Name FROM Part__c] If I'm building a query ...
14
votes
1answer
264 views

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 ...
7
votes
6answers
10k views

How can I get organization's namespace prefix or at least ALL namespace prefixes including org through any API

How can I get organization's namespace prefix through API? This solution doesn't match because it's not supposed that I know anything about org classes. I understand that I can query ApexClasses ...
18
votes
3answers
6k views

How to redirect to default namespace vf page from managed package vf page?

Question If I'm on a managed package page, how can I link to a visualforce page in the default namespace without hardcoding the instance? Background I'm building a skuid page that has a custom ...
7
votes
3answers
4k views

Getting namespace prefix of an org

I have a dev org, in which I have got a namespace prefix. In apex, I want to get this namespace prefix as string. Is there any straight way or I have to describe some object?
4
votes
1answer
1k views

Namespace replaced while saving a lightning component

When I use a Custom Label in a Lightning Component of managed package (with custom namespace), Salesforce changes the file and saves the label with the default namespace. For example, I save $Label....
6
votes
3answers
4k views

Apex: Getting namespace prefix

We have a scenario where we need to make assignments to fields using the method put(String, Object) Ref: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/...
7
votes
2answers
1k views

Inter-namespace communication with LWC

I need to develop two components, in two separate namespaces, that can interact with each other. As per the product documentation it is not possible (yet) to write a component that uses a component ...
3
votes
3answers
967 views

Dynamically get a namespace prefix

In an app that I'm creating, there are some places where I need to create objects based on their string name, and need to take the apps namespace prefix into account dynamically. I've created this ...
7
votes
3answers
366 views

How to get the DE-Orgs Namespaceprefix? (NOT the Namespaceprefix from the scope of an object or class)

The are a lot of solutions to get the namespace of an specific object or class, e.g. ApexClass myClass = [ select NamespacePrefix from ApexClass where Name = 'SomeClassNameHere' ]; But ...
3
votes
1answer
3k views

SFDX & How to handle namespace in lwc with a managed package?

I'm developing some lightning-web-components for a managed package with namespace example7. For all my previous dev work on this managed package, I was using aura rather than lwc, and developing in a ...
2
votes
2answers
159 views

What are the best approaches to follow when you create lightning components for managed pakage?

We created lightning components -without namespaces- and tested them successfully. At the time of packaging, (when a namespace is added) we had to prefix nameSpace__ before every field name, object ...
7
votes
2answers
1k views

Use dynamic namespace references in Lightning Components

It was mentioned here at SFSE (and following the examples in the Lightning Developer Guide it seems to confirm) that right now hardcoded namespace references are quite common or even necessary. As far ...
3
votes
0answers
246 views

Can a managed package be managed through different licenses?

In the context of this question: Can two managed packages utilize common core libraries and other questions concerning managed packages and extensions... For any two apps that share a lot of code, ...
3
votes
1answer
404 views

SObjectType name conflict in queries

I'm creating lookup fields on an object dynamically using the Metadata API, saving the name of a field as a Custom Setting and building queries dynamically. This works perfectly, but there is a ...
2
votes
1answer
494 views

Custom settings in subscriber's org not accessible by managed code

I am currently migrating to a managed package and I wish I could copy unmanaged [protected -- in case it matters] custom settings values to the managed ones in my post install script. However, I'm ...
2
votes
1answer
922 views

Organization Namespace using REST API

I am using this query using REST API to get Apex Classes SELECT Id,Name,NamespacePrefix,Status FROM ApexClass. However this returns all my classes as well Manage package classes. How can I Identify ...
1
vote
1answer
217 views

Custom Label inconsistencies in Managed Packaged

We have two Orgs, DEV and SIT (SIT installed by managed package ), and both have namespaces. In SIT the dynamic reference to the custom labels do not work, but in the Dev org they work. Below is the ...
1
vote
1answer
310 views

A class in one namespace dynamically instantiating an object outside its namespace

I have a managed package with namespace myNamepace and a class ClassA which resides in that package will be dynamically instantiating objects of all subclasses of a particular abstract class ...
0
votes
1answer
79 views

Unable to find action 'getMenuRecords' on the controller. How can I apply my namespace(eioApp) to make this app work

Here is components to this app The App <aura:application extends="force:slds" > <c:listOfMenu /> </aura:application> Here is ListOfMenu Component <aura:component controller="...