Error when creating Remote Site Setting
Error: Only components in the same namespace as the organization can be created through the API. We have a custom "My Domain" set up.
Looked for details on how to create this manually but couldn't find any. Could you provide.
Funny thing is I am actually creating a Country Code lookup which was interestingly your sample.
I had this problem. Solved by doing two things. Firstly switch to classic and run to the error page. Then follow step 9 of this link http://www.srinivas4sfdc.com/2016/01/setting-and-uploading-custom-metadata.html which asks you to copy the url of the page with the error. Don't worry about copying the whole of the URL as it will then get limited to the domain on saving.
the link shown in classic on the error page is different to the link if in Lightning. For me it was of the form https://XXXXXX--c.cs85.visual.force.com
Step 9 in the solution above basically states (I switched to Classic and followed that, it worked fine):
Even after clicking the button your not able to create or if your getting error like Cannot create a new component with the namespace: srinu_dev_ed. Only components in the same namespace as the organization can be created through the API it means in your org you have enabled/created some custom domain.
To fix this issue • In Classic : copy the complete page url where your receiving this error and goto Remote Site setting and give below details and save it.
• In Lightning : you cannot simply copy and paste the URL to the error page on the Custom Metadata Loader tab, you will need the VisualForce URL instead. Use https://________--c.visualforce.com where _____ is your custom domain, for example https://mydomain--c.visualforce.comRemote Site Name : c_mdapi Remote Site URL: Copied page URL Active: Checked
Now that Enhanced Domains are on for everyone the url changes that Salesforce made mean your Remote Site Setting should follow the patterns: Live Org: https://myDomain--c.vf.force.com Sandbox Org: https://myDomain--mySandboxName--c.sandbox.vf.force.com