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
Mel LisauMel Lisau 

How can i create a custom object in Salesforce with a '__' in the name?

I am trying to check if a change tables exists in Salesforce by calling
var name = "acme_npsp__Allocation_c__c"; try { salesforceObject = _service.describeSObject(name); return sObject; } catch (Exception ex) { error = ex.Message; }
but it gives an error:
INVALID_TYPE: salesforceObject type 'acme_npsp__Allocation_c__c' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names.

I have an object npsp__Allocation__c installed from a managed package. Now i want to prefix it with my own prefix , as above acme so i am wanting acme_npsp__Allocation__c, but it thinks the namespace is acme_npsp because of the double __. Is there a way to ignore the double _. I can remove it when i create the object, but the api name will change to acme_npsp_Allocation__c, and when i try to access fields , it will be looking for npsp__Allocation__c, custom object which now doesnt exist ?

The error says it cant be installed from API, can i do it via a package, if so is there an example ?
VinayVinay (Salesforce Developers) 
Hi Mel,

You cannot create object with name '__' only '_' is allowed.  

Thanks,
Mel LisauMel Lisau
I have tried to add a namespace to try and accomodate for this , but I have found as you mentioned "You cannot create object with name '__' only '_' is allowed. ". 
Now all my objects are prefixed with that namesapce and triggers and other custom objects are working as expected. 
Is there a way I can remove this Namesapce or reset my Org to defaults which will remove the Namesapce. 
I have had and work with this org for quite a while ,so would be good if i can keep it running . 
Thankyou
Mel LisauMel Lisau
Sorry , typo. 
Now all my objects are prefixed with that namesapce and triggers and other custom objects are NOT working as expected