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 ...
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 ...
14
votes
1answer
263 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 ...
12
votes
8answers
5k views

Does Schema.GetGlobalDescribe() Account for Prefixes?

It seems to me that in my dev org at least, the keys for the map returned by Schema.GetGlobalDescribe() do not use namespace prefixes... so does anybody know what happens when there are two objects ...
11
votes
2answers
2k views

SObject row was retrieved via SOQL without querying the requested field on managed package

So, we uploaded the managed package and installed it in a new org (as the clients would) but when accessing a vf page we get the error SObject row was retrieved via SOQL without querying the ...
11
votes
3answers
730 views

referencing static resources in lightning components with dynamic namespaces

We have a lightning component thats part of our appexchange package. We have development environments with no namespace, a beta/staging package namespace, and our production package namespace. Is it ...
10
votes
1answer
1k views

How do I update a namespaced Custom Metadata Type record after making a package?

Here's the situation: We have a Lightning App that reads from a Custom Metadata Type to populate a settings/configuration page. Then you can edit the page and click save and that will create a ...
10
votes
1answer
1k views

Lightning component with namespace

When the org has no namespace associated with we write Lightning codes like this - <aura:component extends="c:myComponent"> <aura:component implements="c:myInterface"> where as, when ...
9
votes
1answer
558 views

Too many namespaces error

Once in awhile when I try to convert a lead, I get the following error: Error: System.LimitException: Too many namespaces accessed: 10 External entry point It happens pretty infrequently and I can'...
9
votes
2answers
4k views

Namespace in lightning component

We have one dev org(without namespace) and one packaging org(with namespace) for developing lightning app. We are trying to access custom field in Lightning helper method as expence__c. It works fine ...
8
votes
2answers
3k views

Create scratch org with namespace?

How do I create a scratch org that has the same namespace as my Developer Edition org where the managed package is held? I've followed the instructions in the "Link a Namespace to a Dev Hub Org" page ...
8
votes
1answer
3k views

Can't set lightning component controller

I am following the Trailhead "Create a Lightning Component" tutorial and I have reached the part where I have build the controller (Apex) and I am attempting to set the aura:component controller. My ...
8
votes
2answers
2k views

Lightning Components in Managed Package

Background We are developing an app where we use lightning components. Issue When are trying to package the components, package manager returns an error referencing to some custom fields that are ...
8
votes
0answers
107 views

QuickAction.DescribeQuickActions Broken In Managed Packages

QuickAction.DescribeQuickActions() will return different results when called from a managed package context and unmanaged code. For a given entity type, for example Contacts, you must call ...
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 ...
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?
7
votes
3answers
1k views

Get current namespace in Lightning

If we have a lightning component, which is a part of managed package, is possible somehow purely from js code to figure out current namespace, i.e. without sending additional request to the server? I ...
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 ...
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 ...
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 ...
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/...
6
votes
1answer
699 views

Who has taken “my” Managed package namespace? Can we find out?

I wanted to use my company name as a Namespace Prefix of a new Managed Package App...and it was already taken :-(. Is there a way to find out who or which existing app uses it? Technically or by ...
6
votes
3answers
672 views

Organize Managed Package Dependencies with Unlocked Packages

I build Managed Packages (with namespaces) for my ISV customers. I use external libraries and Open-Source frameworks like fflib or apex-domainbuilder and find dependency management gets more ...
6
votes
1answer
184 views

Type.forName(..) returns null for Unlocked Package with Spring 20' release

It seems that Salesforce Spring 20' release made public classes part of Unlocked 2GP not accessible when @namespaceaccessible is not mentionned. That has a huge impact. I thought this annotation was ...
6
votes
3answers
189 views

Why PageReference('/apex/').getUrl() fails on some Orgs and how to get NamespacePrefix from inside a Managed Package without using a SObject?

I'm using this pattern provided by @bigassforce here How can I get organization's namespace prefix or at least ALL namespace prefixes including org through any API String qualifiedUrl = new ...
6
votes
1answer
385 views

Controller using the wrong namespace - Managed Package

I am working on developing a managed package (Package A) that integrates with a another managed package downloaded form the AppExchange (Package B). By integrate I mean, creating VF pages with the ...
5
votes
2answers
771 views

Link Namespace error=invalid_client_id&error_description=client%20identifier%20invalid

Following occurred while executing this Build First Generation Managed Packages with Salesforce CLI - Setup your Dev Hub Playground Trailhead error=invalid_client_id&error_description=client%...
5
votes
1answer
3k views

Implementation restriction: EntitySubscription only allows security evaluation for non-admin users when LIMIT is specified and at most 1000

I incorporated Andrew Fawcett's amazing enterprise patterns (code here on GitHub) into my managed extension package (Namespace MY_PACKAGE_NS). In one of my CustomObjects after insert triggers I need ...
5
votes
1answer
8k views

How can I load an image in lightning without including the namespace?

I'm trying to include an image that I loaded as a static resource in a Lightning component. The image doesn't show up if I don't include my namespace. For example, this won't work: <img src="/...
5
votes
1answer
253 views

Get Namepsace for code at runtime?

I am in an apex class. Is it possible to get the namespace for this class at runtime? Reason, I serialise a pile of objects to JSON and the namespace is pre-appended on all the attributes. I wish to ...
4
votes
1answer
982 views

How To? Namespace and multiple dev orgs

What is the best practices to use multiple dev orgs while developing app that will be distributed as Managed Package with Namespace prefix. The problem: Once Namespace has been created, there is some ...
4
votes
1answer
143 views

Best practices to follow to organize classes/pages based on app?

Currently we have multiple applications in our client org. It's hard to identify which components like Apex Classes, Visualforce Pages, etc belong to each application unless we look into each ...
4
votes
2answers
2k views

Adding Namespace to the code

While moving code from developer org to packaging org using ANT in few places of the apex code we need to prefix the packaging namespace. Is there any way to automate this process? For instance: ...
4
votes
1answer
1k views

Unable to access Apex in namespaced scratch org

Note: Checking this potential duplicate didn't help. I have a project which uses SFDX and LWC and recently converted it to have a namespace (later it should become a Managed Package). I successfully ...
4
votes
1answer
409 views

Impact of adding namespace on existing code

I am trying out few Lightning stuff and as a part of that I added namespace to my Developer edition. After doing this I realized that all my preexisting custom object's API name is now prefixed with ...
4
votes
3answers
1k views

What namespace to use when developing Lightning components for a managed package?

I have a managed package that is created from our "release org" to which the namespace has been assigned. I have developed some Lightning components for use via Lightning Out in a Visualforce page. ...
4
votes
1answer
277 views

Why does my unpackaged Apex class have “packageVersions” XML tag and a namespace in IDE

ZenDesk is a third party customer support tool that integrates with Salesforce.Because they had a bug with their customizations, I wrote a scheduled class that went into their custom records after ...
4
votes
2answers
3k views

Create Unmanaged Package from an org with Managed package

I have one dev org from where I have created one Managed package. I want the same package created as UnManaged package. So I created the Unmanaged package from the same org. But when i try to install ...
4
votes
1answer
108 views

What is the correct way to resolve the namespace prefixed handle for an apex:chart?

The nearest parallel is RemoteAction methods. The difficulty is that it appears two ways in JavaScript: In a development org, the function is just available as MyController.getData In a managed ...
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....
4
votes
1answer
404 views

Are Force.com Platform limits, per org or per name space?

Within the Salesforce Governor Limits docs, there are many limits that operate at a platform or org level as opposed to at a transaction level. I understand the detail and working of these, but wanted ...
4
votes
1answer
491 views

How to specify namespace and partition for Org Cache when creating managed package?

I'd like to make an ISV App / Managed package that uses the Platform Org Cache. The clearest directions on how to do this are described in this trailhead. However, when writing my code, I am unclear ...
4
votes
0answers
241 views

Unable to add namespaces to lightning component markup using MavensMate

I have enabled a namespace in my org, and am attempting to add markup to lightning components per the Namespace Usage Examples and Reference documentation. The component saves successfully in ...
3
votes
3answers
671 views

How to Use Javascript Remoting Namespace From Managed Package

We have a managed package. In order to implement a sandbox / release management process for our application we have made all our code dynamic. We populate via a custom setting the name of the org's ...
3
votes
1answer
136 views

How can my code tell if it's inside the packaging org?

I can think of at least three different 'environments' for my code: installed, in a customer org, unmanaged, in a cloned dev org, managed, in the packaging org, The first case can be covered by ...
3
votes
1answer
324 views

Can a managed package query and list all the classes installed in a subscriber organization?

By querying the ApexClass object, one can list all the classes that exist within an organization. However, if the code which queries the classes is from a managed packaged, can it see all the records, ...
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 ...
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 ...
3
votes
1answer
11k views

Custom Script Eval error when developing a lightning component in an organization with namespace

I'm getting a "sorry to interrupt" error modal when trying a custom component I'm building. The component doesn't even load (the specified action in the afterScriptsLoaded doesn't even run). The ...