![]() Human Capital Management API Developer Reference
|
vanahcm.LearningCatalogServiceglobal with sharing class LearningCatalogService Represents a learning catalog service structure Methods
getByNameglobal static List<vanahcm.CommonService.LearningCatalog> getByName(Set<String> names, Set<Schema.SObjectField> customFields) Get learning catalog records based on learning catalog name Input Parameters
Return ValueList of LearningCatalog Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. Set<String> names = new Set<String>(); names.add('LearningCatalog1'); Set<Schema.SObjectField> customFields = new Set<Schema.SObjectField>{vanahcm__Learning_Catalog__c.LastModifiedById}; List<vanahcm.CommonService.LearningCatalog> learningCatalogs = vanahcm.LearningCatalogService.getByName(names, customFields); getByIdglobal static List<vanahcm.CommonService.LearningCatalog> getById(Set<ID> ids, Set<Schema.SObjectField> customFields) Get learning catalog records based on learning catalog ID Input Parameters
Return ValueList of LearningCatalog Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. Set<ID> learningCatalogIds = new Set<ID>(); learningCatalogIds.add('a0nj000000KcOqN'); Set<Schema.SObjectField> customFields = new Set<Schema.SObjectField>{vanahcm__Learning_Catalog__c.CreatedById}; List<vanahcm.CommonService.LearningCatalog> learningCatalogs = vanahcm.LearningCatalogService.getById(learningCatalogIds, customFields); createglobal static List<ID> create(List<vanahcm.CommonService.LearningCatalog> learningCatalogs) Insert Learning Catalogs Input Parameters
Return ValueList of ID Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. vanahcm.CommonService.LearningCatalog learningCatalog = new vanahcm.CommonService.LearningCatalog(); learningCatalog.Name = 'Learning Catalog 1'; List<vanahcm.CommonService.LearningCatalog> learningCatalogs = new List<vanahcm.CommonService.LearningCatalog>(); learningCatalogs.add(learningCatalog); List<ID> results = vanahcm.LearningCatalogService.create(learningCatalogs); modifyglobal static List<ID> modify(List<vanahcm.CommonService.LearningCatalog> learningCatalogs) Insert or update Learning Catalogs Input Parameters
Return ValueList of ID Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. vanahcm.CommonService.LearningCatalog learningCatalog = new vanahcm.CommonService.LearningCatalog(); learningCatalog.Id = 'a0oj0000003nCID'; learningCatalog.Name = 'Updated Learning Catalog Title'; List<vanahcm.CommonService.LearningCatalog> learningCatalogs = new List<vanahcm.CommonService.LearningCatalog>(); learningCatalogs.add(learningCatalog); List<ID> results = vanahcm.LearningCatalogService.modify(learningCatalogs); |