Human Capital Management Apex API Developer Reference

vanahcm.CandidateFeedbackService

global with sharing class CandidateFeedbackService

Represents a Candidate Feedback service structure

Methods

getById

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

Get candidate feedback records based on candidate feedback ID

Input Parameters

Name Type Description
ids Set<ID> ID of candidate feedback records that need to be returned
customFields Set<Schema.SObjectField> Set of custom fields that need to be queried for candidate feedback

Return Value

List of CandidateFeedback

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

Set<Schema.SObjectField> customFields = new Set<Schema.SObjectField>{vanahcm__Feedback__c.vanahcm__Comments__c};
    
List<vanahcm.CandidateFeedbackService.CandidateFeedback> candidateFeedbacks = vanahcm.CandidateFeedbackService.getById(candidateFeedbackIds, customFields);

getByCandidate

global static List<vanahcm.CommonService.CandidateFeedback> getByCandidate(Set<ID> candidateIds, Set<Schema.SObjectField> customFields)

Get candidate feedback records based on candidate ID

Input Parameters

Name Type Description
candidateIds Set<ID> ID of candidate records
customFields Set<Schema.SObjectField> Set of custom fields that need to be queried for candidate feedback

Return Value

List of CandidateFeedback

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

Set<Schema.SObjectField> customFields = new Set<Schema.SObjectField>{vanahcm__Feedback__c.vanahcm__Comments__c};
    
List<vanahcm.CandidateFeedbackService.CandidateFeedback> candidateFeedbacks = vanahcm.CandidateFeedbackService.getByCandidate(candidateIds, customFields);

getByCandidateEmail

global static List<vanahcm.CommonService.CandidateFeedback> getByCandidateEmail(Set<String> emails, Set<Schema.SObjectField> customFields)

Get candidate feedback records based on candidate email

Input Parameters

Name Type Description
emails Set<String> Email of candidate records
customFields Set<Schema.SObjectField> Set of custom fields that need to be queried for candidate feedback

Return Value

List of CandidateFeedback

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> emails = new Set<String>();

//Add Email of vanahcm__Feedback__c.vanahcm__Candidate__c to emails
emails.add('foo@bar.com');

Set<Schema.SObjectField> customFields = new Set<Schema.SObjectField>{vanahcm__Feedback__c.vanahcm__Comments__c};
    
List<vanahcm.CandidateFeedbackService.CandidateFeedback> candidateFeedbacks = vanahcm.CandidateFeedbackService.getByCandidateEmail(emails, customFields);

getByJobApplication

global static List<vanahcm.CommonService.CandidateFeedback> getByJobApplication(Set<ID> jobApplicationIds, Set<Schema.SObjectField> customFields)

Get candidate feedback records based on job application ID

Input Parameters

Name Type Description
jobApplicationIds Set<ID> ID of job application records
customFields Set<Schema.SObjectField> Set of custom fields that need to be queried for candidate feedback

Return Value

List of CandidateFeedback

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

Set<Schema.SObjectField> customFields = new Set<Schema.SObjectField>{vanahcm__Feedback__c.vanahcm__Comments__c};
    
List<vanahcm.CandidateFeedbackService.CandidateFeedback> candidateFeedbacks = vanahcm.CandidateFeedbackService.getByJobApplication(jobApplicationIds, customFields);

create

global static List<ID> create(List<vanahcm.CommonService.CandidateFeedback> candidateFeedbacks)

Insert Candidate Feedbacks

Input Parameters

Name Type Description
candidateFeedbacks List<vanahcm.CommonService.CandidateFeedback> Candidate feedback 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.CandidateFeedback candidateFeedback = new vanahcm.CommonService.CandidateFeedback();
candidateFeedback.Candidate = 'a1fj000000103mv';

List<vanahcm.CommonService.CandidateFeedback> candidateFeedbacks = new List<vanahcm.CommonService.CandidateFeedback>();
candidateFeedbacks.add(candidateFeedback);

List<ID> results = vanahcm.CandidateFeedbackService.create(candidateFeedbacks);

modify

global static List<ID> modify(List<vanahcm.CommonService.CandidateFeedback> candidateFeedbacks)

Insert or update Candidate Feedbacks

Input Parameters

Name Type Description
candidateFeedbacks List<vanahcm.CommonService.CandidateFeedback> Candidate feedback 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.CandidateFeedback candidateFeedback = new vanahcm.CommonService.CandidateFeedback();

candidateFeedback.Id = 'a0oj0000003nCID';
candidateFeedback.Recommendation = 'Updated Sample recommendation';

List<vanahcm.CommonService.CandidateFeedback> candidateFeedbacks = new List<vanahcm.CommonService.CandidateFeedback>();
candidateFeedbacks.add(candidateFeedback);

List<ID> results = vanahcm.CandidateFeedbackService.modify(candidateFeedbacks);
© Copyright 2009–2018 FinancialForce.com, inc. Confidential – all rights reserved. Various trademarks held by their respective owners.