0 Replies Latest reply on Apr 3, 2007 11:30 AM by 552657

    Restricting User from creating new records using when-validate-record


      I have a requirement for which I have to restrict he user from creating a record in the Supplier Master form if the suppliier type is 'Affiliate Supplier'.

      I have done the following setups

      Seq 10
      Description Restricting user from creating Affiliate records
      Level Function
      Enabled Yes

      Trigger Event WHEN-VALIDATE-RECORD
      Trigger object VNDR
      Condition "${item.VNDR.VENDOR_TYPE_DISP_MIR.value} is NOT NULL
      ${item.VNDR.VENDOR_TYPE_DISP_MIR.value} LIKE 'Affiliate%'
      Processing Mode BOTH

      Level User
      Value User Name

      Action Sequence 1
      Type Message
      Action Description Saving Affiliate record
      Language ALL
      Message Type Show
      Message Text You Cannot Create Affiliate records Here

      Action Sequence 2
      Type Builtin
      Action Description Stop Proceesing
      Language ALL
      Action Enabled Yes

      This is working good on one instance but when I moved it to another instance
      when I query the form and try to navigate to the bank accounts tab of the form which is based on a differnt block i.e VNDR_USES block, the when-validate-record trigger fires there also and stops the processing.
      Any suggestions on this would be higly appriciated.

      Thanks in Advance.