2.6.7 Validation Rule

This topic provides the systematic instructions of validation rule.

This is the PL/SQL validation code based on which the system will check the value of the new field and validates at the time of transaction processing. Entry to this field is mandatory if you have checked against 'Validation Allowed'.

To do this, you need to:

  1. Create a new user defined field of type 'Text',
  2. Specify 'Usage Allowed' as 'Product',
  3. Check against 'Validation Allowed', and
  4. Write a code to validate the value entered in the new field. In the validation rule, you write a code to check that the value of the first nominee specified in the Customer Accounts Maintenance screen for the customer for whom you are processing a contract and the value entered at the time of processing a contract are same.
    Syntax to be used in Derivation and Validation Rules (@FIELD_VAL)

    (@FIELD_VAL) holds the Value UDF. This is s mandatory for Derivation Logic and it can be used in Validation logic to get the value of the field.

    For example, (@FIELD_VAL): = 'USD';

    Select ccy_code into (@FIELD_VAL) from

    CYTMS_CCY_DEFN where country = 'USA';

    (@RECORD_KEY)

    (@RECORD_KEY) behaves differently for UDFs' linked to Product and different for UDFs'
    linked to Function ID.

    (@RECORD_KEY) When UDF is linked to FUNCTION_ID

    To use (@Record_key) in UDFs' where Usage allowed is 'Function_id' you have to maintain Function Key Mapping, which will be used to determine the record key before you define the UDF.

    Note:

    You are allowed to Use any syntax in the pl/sql code other than DML statements (INSERT, DELETE, UPDATE) and DBMS package. You will not be allowed to USE any package, function, and procedures other than GLOBAL, DEBUG and CSPKE_MISC.