Human Capital Management Apex API Developer Reference

vanahcm.JobQuestionSetService

global with sharing class JobQuestionSetService

Represents a Job Question Set service structure

Methods

getById

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

Get job question set with related job question records based on job question set ID

Input Parameters

Name Type Description
ids Set<ID> ID of job question set records that need to be returned
customFields Map<Schema.SObjectType, Set<Schema.SObjectField>> Collection of custom fields that need to be queried for Job Question Set and Job Question

Return Value

List of JobQuestionSet

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> jobQuestsionSetIds = new Set<ID>();
jobQuestsionSetIds.add('a0nj000000KcOqN');

Map<Schema.SObjectType, Set<Schema.SObjectField>> customFields = new Map<Schema.SObjectType, Set<Schema.SObjectField>>{
    vanahcm__Job_Question_Set__c.SObjectType => new Set<Schema.SObjectField>{vanahcm__Job_Question_Set__c.vanahcm__Description__c},
    vanahcm__Job_Questions__c.SObjectType => new Set<Schema.SObjectField>{vanahcm__Job_Questions__c.CreatedById}};

List<vanahcm.CommonService.JobQuestionSet> jobQuestionSets = vanahcm.JobQuestionSetService.getById(jobQuestsionSetIds, customFields);

getByName

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

Get job question set with related job question records based on job question set Name

Input Parameters

Name Type Description
names Set<String> Name of job question set records that need to be returned
customFields Map<Schema.SObjectType, Set<Schema.SObjectField>> Collection of custom fields that need to be queried for Job Question Set and Job Question

Return Value

List of JobQuestionSet

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

//Add Name of vanahcm__Job_Question_Set__c to names
names.add('foo bar');

Map<Schema.SObjectType, Set<Schema.SObjectField>> customFields = new Map<Schema.SObjectType, Set<Schema.SObjectField>>{
    vanahcm__Job_Question_Set__c.SObjectType => new Set<Schema.SObjectField>{vanahcm__Job_Question_Set__c.vanahcm__Description__c},
    vanahcm__Job_Questions__c.SObjectType => new Set<Schema.SObjectField>{vanahcm__Job_Questions__c.CreatedById}};

List<vanahcm.CommonService.JobQuestionSet> jobQuestionSets = vanahcm.JobQuestionSetService.getByName(names, customFields);

create

global static List<vanahcm.JobQuestionSetService.Result> create(List<vanahcm.CommonService.JobQuestionSet> jobQuestionSets)

Insert Job Question Sets with related Job Questions

Input Parameters

Name Type Description
jobQuestionSets List<vanahcm.CommonService.JobQuestionSet> Job question set records that need to be inserted

Return Value

List of Result

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.JobQuestionSet jobQuestionSet = new vanahcm.CommonService.JobQuestionSet();
jobQuestionSet.Description = 'foo bar';
jobQuestionSet.Name = 'foo bar';

List<vanahcm.CommonService.JobQuestionSet> jobQuestionSets = new List<vanahcm.CommonService.JobQuestionSet>();
jobQuestionSets.add(jobQuestionSet);

List<vanahcm.JobQuestionSetService.Result> results = vanahcm.JobQuestionSetService.create(jobQuestionSets);

modify

global static List<vanahcm.JobQuestionSetService.Result> modify(List<vanahcm.CommonService.JobQuestionSet> jobQuestionSets)

Insert or update Job Question Sets with related Job Questions

Input Parameters

Name Type Description
jobQuestionSets List<vanahcm.CommonService.JobQuestionSet> Job question set records that need to be inserted or updated

Return Value

List of Result

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.JobQuestionSet jobQuestionSet = new vanahcm.CommonService.JobQuestionSet();
jobQuestionSet.Id = 'a20xs00230234sde';
jobQuestionSet.Description = 'foo bar';
jobQuestionSet.Name = 'foo bar';

List<vanahcm.CommonService.JobQuestionSet> jobQuestionSets = new List<vanahcm.CommonService.JobQuestionSet>();
jobQuestionSets.add(jobQuestionSet);

List<vanahcm.JobQuestionSetService.Result> results = vanahcm.JobQuestionSetService.modify(jobQuestionSets);

vanahcm.JobQuestionSetService.Result

global with sharing class Result

Represents a Result

Properties

Name Type Description
RecordId ID Job question set ID
JobQuestionIds List<ID> List of ID for Job Question Set's Question
© Copyright 2009–2017 FinancialForce.com, inc. Confidential – all rights reserved. Various trademarks held by their respective owners.