4 Replies Latest reply on Dec 21, 2017 2:59 PM by Salazkin Ann

    Trigger to link employee to Oracle User  - fnd_user

    Salazkin Ann

      Question: is it OK to create on insert trigger for per_all_people_f table - whenever a new person is inserted (per_all_people_f) then update an existing Oracle user record (in fnd_user) with  employee_id. I've tested - seems working OK. When I called an api FND_USER_PKG.UpdateUser - sometimes errors are raised and need a patch or smth... that is why for us preferably to use the direct update of fnd_user.

      Note: we do have a limited installations in EBS - Receivables/GL. We needed to link hr record to fnd user only for the limited Collections usage. The direct update of fnd_user through the trigger seems OK  in our 'limited usage' case. Please, confirm it is OK or alternative solution. HR is installed as shared only.

        • 1. Re: Trigger to link employee to Oracle User  - fnd_user
          John_K

          Updating base tables directly is never supported. What is the error you are getting on the API? If you're in shared mode you might get away with triggering off an insert into per_all_people_f, however if you ever go to full mode you'll need to consider date-tracking because new records are inserted which aren't new people.

           

          Why not just create the employee first, then create the user account - the employee will exist then when you create the user account and can be easily set. Why are you creating user accounts before the employee?

          • 2. Re: Trigger to link employee to Oracle User  - fnd_user
            Salazkin Ann

            It is historically this way, we only had Oracle users records setup (fnd_user was populated) and table per_all_people_f was never populated with records  before the R12 upgrade - we only need this functionality (to create employee record and to tie it to the existing app user record) for the Collections upgraded only. So, we'll probably follow the same existing flow.

            I think API usage ties us to the constant patching and extra functionality that we really do not need (for instance, when I tested with api parsing the employee_id and did not supply the email - I do not need it to update - the email on the User record went blank). Error was by the way, when I tried to use date tracking and api FND_USER_PKG.UpdateUser : APP-FND-02912 The Person is linked to an invalid Employee... Oracle suggest patch  for certain package but seems our version of the package is OK

            • 3. Re: Trigger to link employee to Oracle User  - fnd_user
              John_K

              Personally, I wouldn't update the table directly. I'd get the API working - if you mess it up by updating the table manually, you could be in all kinds of horrors.

              • 4. Re: Trigger to link employee to Oracle User  - fnd_user
                Salazkin Ann

                Figured this api of Oracle would not work probably in our ON INSERT trigger, it works when data is committed  after the insertion to per_all_people_f because before the linking/updating the employee_id in fnd_user the api checks whether this employee in per_all_people_f and errors if it is not ...