Tuesday, March 4, 2014

Using API to update Phone numbers of an employee

hr_phone_api has four procedures:

  1. create_phone
  2. update_phone
  3. delete_phone
  4. create_or_update_phone


Use this procedure for creating or updating a phone number. Instructions about parameters are inline.

procedure create_or_update_phone
 (
p_phone_id  =>'', --this is an in out parameter enter a value on if you want to perform update.
p_object_version_number =>'', --this is an in out parameter enter a value on if you want to perform update.
p_effective_date=>'12-jan-2014', --Effective date needs to be < = date from.
p_date_from=>'12-jan-2014', --This cannot be null
p_date_to  =>NULL, --This can be null
p_phone_type=> 'xx' --find your value in HR_LOOKUPS with type = 'PHONE_TYPE'
p_phone_number=> '88888'-- enter the phone number you want to create or update
)
;