Human Capital Management Apex API Developer Reference
|
vanahcm.LearningCourseServiceglobal with sharing class LearningCourseService Represents a Learning Course service structure Methods
createglobal static List<ID> create(List<vanahcm.CommonService.LearningCourse> learningCourses) Insert Learning Courses 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.LearningCourse learningCourse = new vanahcm.CommonService.LearningCourse(); learningCourse.LearningCatalog = 'a2Q150000007QIM'; List<vanahcm.CommonService.LearningCourse> learningCourses = new List<vanahcm.CommonService.LearningCourse>(); learningCourses.add(learningCourse); List<ID> resultIds = vanahcm.LearningCourseService.create(learningCourses); modifyglobal static List<ID> modify(List<vanahcm.CommonService.LearningCourse> learningCourses) Insert or update Learning Courses 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.LearningCourse learningCourse = new vanahcm.CommonService.LearningCourse(); learningCourse.Id = 'a2S15000000VCPg'; learningCourse.LearningCatalog = 'a2Q150000007QIM'; List<vanahcm.CommonService.LearningCourse> learningCourses = new List<vanahcm.CommonService.LearningCourse>(); learningCourses.add(learningCourse); List<ID> resultIds = vanahcm.LearningCourseService.modify(learningCourses); getByIdglobal static List<vanahcm.CommonService.LearningCourse> getById(Set<ID> ids, Set<Schema.SObjectField> customFields) Get learning course records based on learning course ID Input Parameters
Return ValueList of LearningCourse 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> learningCourseIds = new Set<ID>();
learningCourseIds.add('a2S15000000VCPg');
Set<Schema.SObjectField> customFields = new Set<Schema.SObjectField>{vanahcm__Learning_Plan__c.CreatedById};
List<vanahcm.CommonService.LearningCourse> learningCourses = vanahcm.LearningCourseService.getById(learningCourseIds, customFields);
getByNameglobal static List<vanahcm.CommonService.LearningCourse> getByName(Set<String> names, Set<Schema.SObjectField> customFields) Get Learning Course records based on learning course Name Input Parameters
Return ValueList of LearningCourse 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('Learning');
Set<Schema.SObjectField> customFields = new Set<Schema.SObjectField>{vanahcm__Learning_Plan__c.CreatedById};
List<vanahcm.CommonService.LearningCourse> learningCourses = vanahcm.LearningCourseService.getByName(names, customFields);
getByWorkerglobal static List<vanahcm.CommonService.LearningCourse> getByWorker(Set<ID> workerIds, Set<Schema.SObjectField> customFields) Get learning course records based on learning course worker ID Input Parameters
Return ValueList of LearningCourse 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> workerIds = new Set<ID>();
workerIds.add('a4G15000000PiPk');
Set<Schema.SObjectField> customFields = new Set<Schema.SObjectField>{vanahcm__Learning_Plan__c.CreatedById};
List<vanahcm.CommonService.LearningCourse> learningCourses = vanahcm.LearningCourseService.getByWorker(workerIds, customFields);
|