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!

Oracle Apps Form Personalization: How to make a field mandatory...

Discussion in 'General' started by pradhyumn16_dec, Nov 23, 2010.

  1. pradhyumn16_dec

    pradhyumn16_dec Active Member

    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    75
    Dear,
    I am new in Oracle Apps. I am a technical consultant. I face a problem during make a field mandatory.
    I want to make a field (PO_APPROVE.NOTE) mandatory on a block (PO_APPROVE) that consists of two buttons(OK & Cancel) also. I tried on the following triggers ---

    ---------------------------------------------------------
    1) Trigger Event : WHEN-NEW-FORM-INSTANCE
    Trigger Object:
    Condition :

    Property : Item-->PO_APPROVE.NOTE-->REQUIRED-->TRUE

    2) TRIGGER EVENT : WHEN-VALIDATE-RECORD
    Trigger Object : PO_APPROVE
    Condition : :pO_APPROVE.NOT IS NULL

    Message : 'NOTE is mandatory field'
    -----------------------------------------------------------

    When i run the form, the trigger fire on both the buttons. If i press the CANCEL button then OK button does not work and cursor remains on same block mean form does not close.
    But i want to fire this on OK Button. If i press CANCEL button then form should be close. If i press the OK button then trigger fire and record should be save.

    Please help.....Its Urgent

    Pradhyumn Sharma
     
  2. shailuram

    shailuram Active Member

    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    75
    Location:
    Dallas, Texas
    I guess you should rather use the following code to make the "NOTE" field Mandatory:

    if(Event_name='When-New-Form-Instance') then
    App_item_property2.Set_property(PO_APPROVE.NOTE, REQUIRED,TRUE);
    end if;