Answers for "apex update named credentials"

0

apex update named credentials

static MetadataService.MetadataPort createService()
{
    MetadataService.MetadataPort service = new MetadataService.MetadataPort();
    service.SessionHeader = new MetadataService.SessionHeader_element();
    service.SessionHeader.sessionId = UserInfo.getSessionId();
    return service;
}
static List<MetadataService.SaveResult> createMetadata(MetadataService.Metadata input)
{
    return createService().createMetadata(new List<MetadataService.Metadata> { input });
}
static List<MetadataService.SaveResult> updateMetadata(MetadataService.Metadata input)
{
    return createService().updateMetadata(new List<MetadataService.Metadata> { input });
}
static List<MetadataService.DeleteResult> deleteMetadata(String type, String fullName)
{
    return createService().deleteMetadata(type, new List<String> { fullName });
}
Posted by: Guest on September-22-2021

Browse Popular Code Answers by Language