Create static resource with apex code

Each create call corresponds to a callout.  


MetadataService.MetadataPort service = createService();         MetadataService.StaticResource staticResource = new MetadataService.StaticResource();    staticResource.fullName = 'Barpanel';    staticResource.contentType = 'png';    staticResource.cacheControl = 'public';    staticResource.content = EncodingUtil.base64Encode(Blob.valueOf('Static stuff'));    MetadataService.AsyncResult[] results = service.create(new List<MetadataService.Metadata> { staticResource });

Post a Comment

0 Comments