Human Capital Management Apex API Developer Reference

vanahcm.LearningCatalogService

global with sharing class LearningCatalogService

Represents a learning catalog service structure

Methods

getByName

global static List<vanahcm.CommonService.LearningCatalog> getByName(Set<String> names, Set<Schema.SObjectField> customFields)

Get learning catalog records based on learning catalog name

Input Parameters

Name Type Description
names Set<String> Name of learning catalog records that need to be returned
customFields Set<Schema.SObjectField> Collection of custom fields that need to be queried for Learning Catalog

Return Value

List 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);

getById

global static List<vanahcm.CommonService.LearningCatalog> getById(Set<ID> ids, Set<Schema.SObjectField> customFields)

Get learning catalog records based on learning catalog ID

Input Parameters

Name Type Description
ids Set<ID> ID of learning catalog records that need to be returned
customFields Set<Schema.SObjectField> Collection of custom fields that need to be queried for Learning Catalog

Return Value

List 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);

create

global static List<ID> create(List<vanahcm.CommonService.LearningCatalog> learningCatalogs)

Insert Learning Catalogs

Input Parameters

Name Type Description
learningCatalogs List<vanahcm.CommonService.LearningCatalog> Learning catalog records that need to be inserted

Return Value

List 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);

modify

global static List<ID> modify(List<vanahcm.CommonService.LearningCatalog> learningCatalogs)

Insert or update Learning Catalogs

Input Parameters

Name Type Description
learningCatalogs List<vanahcm.CommonService.LearningCatalog> Learning catalog records that need to be inserted or updated

Return Value

List 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);
© Copyright 2009–2017 FinancialForce.com, inc. Confidential – all rights reserved. Various trademarks held by their respective owners.