You need to sign in to do that
Don't have an account?
Haris Osmanagic, B&H
Error when using readMetadata() with ApexClass
I am trying to get a list of all metadata objects with the given name. However, the code (in Java) below fails:
Using connection.listMetadata() I am able to confirm that SampleDeployClass exists. I'm using a DE org, and the user has the Modify all data permission.
Is this something expexted (couldn't find it in the docs)? If yes, how am I able to confirm that a set of metadata objects already exists (other than retrieve() (https://www.salesforce.com/us/developer/docs/api_meta/Content/meta_retrieve.htm))?
Seems like renameMetadata() (https://www.salesforce.com/us/developer/docs/api_meta/Content/meta_renameMetadata.htm) doesn't work with ApexClasses either. Is it maybe a restriction in the API which prevents anyone from changing Apex code?
connection.readMetadata("ApexClass", new String[] {"SampleDeployClass"});with this error:
Exception in thread "main" com.sforce.ws.SoapFaultException: INVALID_TYPE: This type of metadata is not available for this organization
Using connection.listMetadata() I am able to confirm that SampleDeployClass exists. I'm using a DE org, and the user has the Modify all data permission.
Is this something expexted (couldn't find it in the docs)? If yes, how am I able to confirm that a set of metadata objects already exists (other than retrieve() (https://www.salesforce.com/us/developer/docs/api_meta/Content/meta_retrieve.htm))?
Seems like renameMetadata() (https://www.salesforce.com/us/developer/docs/api_meta/Content/meta_renameMetadata.htm) doesn't work with ApexClasses either. Is it maybe a restriction in the API which prevents anyone from changing Apex code?
https://www.salesforce.com/us/developer/docs/api_meta/index_Left.htm#CSHID=meta_readMetadata.htm|StartTopic=Content%2Fmeta_readMetadata.htm|SkinName=webhelp