You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, this repo is GREAT! I was wondering if we can create and deploy the apex class natively?
Couldn't find any example in this repo. Can anybody share the example if its possible?
The text was updated successfully, but these errors were encountered:
public static void createClass()
{
MetadataService.MetadataPort service = createService();
MetadataService.ApexClass apexClass = new MetadataService.ApexClass();
apexClass.apiVersion = 50;
apexClass.fullName = 'test';
//apexClass.label = 'TestHamza';
apexClass.content = EncodingUtil.base64Encode(Blob.valueOf('public with sharing class TestHamza{}'));
List<MetadataService.SaveResult> results =
service.createMetadata(
new MetadataService.Metadata[] { apexClass });
handleSaveResults(results[0]);
}
but it's giving the error
Line: 13432, Column: 1System.CalloutException: Web service callout failed: WebService returned a SOAP Fault: '' is not a valid value for the enum 'ApexCodeUnitStatus' faultcode=soapenv:Client faultactor=
--
mhamzas
changed the title
Can we create ApexClass? Any Example?
Can we create ApexClass natively? Any Example?
Oct 18, 2022
Hi,
First, this repo is GREAT! I was wondering if we can create and deploy the apex class natively?
Couldn't find any example in this repo. Can anybody share the example if its possible?
The text was updated successfully, but these errors were encountered: