Agency personnel can Search for vacancies assigned to that agency, and view vacancy details such as the maximum number of applicants that can submit for a vacancy and current number of applicants.They can also create user accounts for candidate and apply for job on behalf of candidate.
Basic Requirement
Our basic requirement is as mentioned below:-
Oracle application doesn't restrict agency from entering duplicate candidate.Now our organization is landing up paying multiple times for a single candidate,since there are multiple entry for a single candidate is found. Now our basic requirement is to restrict the agency from entering duplicate candidate.
The duplicate candidate can be identified by email address.
If agency personnel try to enter candidate with already existing email address then application should throw an error.
Pre-Requisite
Following are the pre-requisites for our solution approach
1) iRecruitment is setup is complete and functioning as intended.
2) agency functionality is working as intended.
Solution Approach
Before we start with the solution,we are considering that readers are well aware of API hooks and its usages.The registering process and other technical functionality related to API hook will not be discussed here.
The duplicate candidate can be identified in a different ways. Here we will take the email address as a unique identifier.
To implement the solution here we will create an API hook on IRC_PARTY_API.CREATE_CANDIDATE_INTERNAL (BP)
This is because when agency creates an candidate it calls the above mentioned API.
1) Create a fnd Message
Navigation:- Application Developer >> Messages
Name:- XX_IRC_DUPLICATE_ERROR_MSG
Language:- US
Application:- Human Resources
Type:- Error
2) Create program logic
a) First check if there is any fnd_user exists or not
b) Now if the fnd_user exists then whether that is active fnd_user or not. The term "active" is very important here because ex-employee or ex-contingent worker may apply for the job through an agency.
c) If there is no active fnd_user then we have to check for person record(in PER_ALL_PEOPLE_F).We have check whether any person record with the same email address exists with the same email address or not. This is required, because recruiter/agency can also create a candidate and apply for vacancy on behalf of candidate. When recruiter/agency creates an candidate oracle application doesn't create any fnd_user entry for that candidate.Now there is a possibility that recruiter already created candidate record for which agency is trying to create the same.
d) Now if there is any Active fnd_user or any person record exists with the same email address, raise an application error.
3) Now our program is ready, Its the time to register API hook and enjoy customization
Note:-1) Now when an applicant register himself/herself into a iRecruitment system oracle creates a login.It means there is entry in FND_USER table. The username of the incoming candidate is same as his/her email address. Hence when a person register himself/herself through IrcVisitor.jsp page, then it automatically checks for uniqueness of the username(here it is email address). At least for this business case we need to bother about the duplicate entry.
2) When Recruiter creates a candidate, oracle application also call the same API IRC_PARTY_API.CREATE_CANDIDATE_INTERNAL.
Hence any API hook create on the API is also applicable for recruiter candidate creation.
3) Here we have used other input parameter P_BUSINESS_GROUP_ID,P_LAST_NAME,P_FIRST_NAME,P_DATE_OF_BIRTH,P_TITLE. This is just to show that if require we can use those parameter in API hook .
4) Here we have also learned how to use dynamic part in fnd_message - Token substitute in Fnd Message.
Note2:- a) To display the Error message in application. We need to run a concurrent program after creation of fnd message.Otherwise instead of message text application will display the message name.
Concurrent Program Name:- Generate Messages
Parameters:-
Language – US
Application – Human resources
Mode - DB_TO_RUNTIME
Disclaimer:- This is a knowledge sharing site. This topic talks about a custom solution. Oracle may not provide you a support for any data corruption or any other problem in your custom code/problem arises because of the custom code. The author is not responsible for any kind of system/data problem appears because of usages of this code.Reader/implementer must do it on his/her own risk/responsibility.