1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

Trigger not working

Discussion in 'Oracle Apps Technical' started by jagadekara, May 18, 2015.

  1. jagadekara

    jagadekara Forum Guru

    Messages:
    1,126
    Likes Received:
    145
    Trophy Points:
    1,805
    Location:
    Pulivendula
    Hi All,

    Is this correct?

    CREATE OR REPLACE TRIGGER XXST_USER_RESP_ASSIGN_TRG
    INSTEAD OF INSERT ON FND_USER_RESP_GROUPS_DIRECT
    for each row
    BEGIN
    INSERT INTO XXST_USER_RESP_ASSIGNMENT (user_id,responsibility_id)
    values:)new.user_id,:new.responsibility_id);
    commit;
    END;

    When I assign responsibility, FND_USER_RESP_GROUPS_DIRECT view is populating. But XXST_USER_RESP_ASSIGNMENT is not populated. Any wrong in above?
     
  2. RG Hegde

    RG Hegde Forum Advisor

    Messages:
    185
    Likes Received:
    35
    Trophy Points:
    310
    Location:
    Pune
  3. jagadekara

    jagadekara Forum Guru

    Messages:
    1,126
    Likes Received:
    145
    Trophy Points:
    1,805
    Location:
    Pulivendula
    Thanks Hegde,

    My code is also as same as in that example. Some body told that if that view has DISTINCT, then it will not work.

    That's why it is not working.

    Do u know any other way to insert view data into my custom table?

    Actually I want to use it in Oracle Event Alert.
     
  4. RG Hegde

    RG Hegde Forum Advisor

    Messages:
    185
    Likes Received:
    35
    Trophy Points:
    310
    Location:
    Pune
    Hello Jagadekara,

    The view FND_USER_RESP_GROUPS_DIRECT is getting data from wf table wf_user_role_assignments.

    I believe create a trigger on Oracle Base table is not a good practice and not recommended.

    Can we think about Form Personalization/Custom.pll to meet this requirement...!!!
     
    jagadekara likes this.
  5. jagadekara

    jagadekara Forum Guru

    Messages:
    1,126
    Likes Received:
    145
    Trophy Points:
    1,805
    Location:
    Pulivendula
    Thanks Hegde,

    I too noticed wf_user_role_assignments and wrote alert on this. Working fine.
    But when we assign 3 responsibilities at a time and the save. Now that table inserting 3 records. So it is sending 3 mails. But my client required single mail with 3 records in it.

    So Is it possible?