![]() Human Capital Management Apex API Developer Reference
|
vanahcm.ResponseServiceglobal with sharing class ResponseService Represents a Response service structure Methods
getByIdglobal static List<vanahcm.CommonService.Response> getById(Set<ID> ids, Set<Schema.SObjectField> customFields) Get response records based on response ID Input Parameters
Return ValueList of Response 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> responseIds = new Set<ID>(); responseIds.add('a0nj000000KcOqN'); Set<Schema.SObjectField> customFields = new Set<Schema.SObjectField>{vanahcm__Response__c.vanahcm__Response_Text__c}; List<vanahcm.CommonService.Response> responses = vanahcm.ResponseService.getById(responseIds, customFields); getByJobQuestionglobal static List<vanahcm.CommonService.Response> getByJobQuestion(Set<ID> jobQuestionIds, Set<Schema.SObjectField> customFields) Get Response records based on Job Question Id Input Parameters
Return ValueList of Response 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> jobQuestionIds = new Set<ID>(); jobQuestionIds.add('a0mk000000RcOsH'); Set<Schema.SObjectField> customFields = new Set<Schema.SObjectField>{vanahcm__Response__c.vanahcm__Response_Text__c}; List<vanahcm.CommonService.Response> responses = vanahcm.ResponseService.getByJobQuestion(jobQuestionIds, customFields); getByJobApplicationglobal static List<vanahcm.CommonService.Response> getByJobApplication(Set<ID> jobApplicationIds, Set<Schema.SObjectField> customFields) Get response records based on job application ID Input Parameters
Return ValueList of Response 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__Response__c.vanahcm__Response_Text__c}; List<vanahcm.CommonService.Response> response = vanahcm.ResponseService.getByJobApplication(jobApplicationIds, customFields); createglobal static List<ID> create(List<vanahcm.CommonService.Response> responses) Insert Responses 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.Response response = new vanahcm.CommonService.Response(); response.JobApplication = 'a1fj000000103mv'; List<vanahcm.CommonService.Response> responses = new List<vanahcm.CommonService.Response>(); responses.add(response); List<ID> results = vanahcm.ResponseService.create(responses); modifyglobal static List<ID> modify(List<vanahcm.CommonService.Response> responses) Insert or update Responses 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.Response response = new vanahcm.CommonService.Response(); response.Id = 'a0oj0000003nCID'; response.ResponseText = 'Updated Sample response'; List<vanahcm.CommonService.Response> responses = new List<vanahcm.CommonService.Response>(); responses.add(response); List<ID> results = vanahcm.ResponseService.modify(responses); |