Oracle Personalization

Calling DB Function in Personalization

Ex: This is a package body and contains a function GET_CONSOLATION_LEAVE
CREATE OR REPLACE PACKAGE BODY TAMER_PKG IS FUNCTION GET_CONSOLATION_LEAVE (P_ATT_TYPE NUMBER, P_ATT_REASON NUMBER) RETURN NUMBER is V_ABS_OK NUMBER; BEGIN IF P_ATT_TYPE = 7040 AND P_ATT_REASON = 7055 THEN V_ABS_OK := 1; ELSE V_ABS_OK := 0; END IF; RETURN V_ABS_OK; EXCEPTION WHEN NO_DATA_FOUND THEN RETURN 0; WHEN OTHERS THEN RETURN 0 ; END GET_CONSOLATION_LEAVE; END TAMER_PKG;

Last update 27-July-2009

2

tamkamal@hotmail.com

Oracle Personalization
Help > Diagnostics > Examine

Calling DB Function in Personalization

1- Get the name of field (item) which you will sent it as parameter

2- Search about block and field you want

Name will be Block Name.Field Name Ex: ABA.ABSENCE_ATTENDANCE_ID

Last update 27-July-2009

3

tamkamal@hotmail.com

Oracle Personalization
3- Go to Personalize Help > Diagnostics > Custom Code > Personalize

Calling DB Function in Personalization

4- Write Sequence and Description for your Personalization Ex:

5- From Trigger Event choose WHEN-VALIDATE-RECORD 6- From Trigger Object choose Block Name 7- In Condition field write full Function Name and it's parameters if it is exit
Last update 27-July-2009

4

tamkamal@hotmail.com

Oracle Personalization
8- Write : before every Parameter

Calling DB Function in Personalization

The following picture show more details:

Last update 27-July-2009

5

tamkamal@hotmail.com

Oracle Personalization
9- Go to Actions Tab

Calling DB Function in Personalization

10- Make a message to be appear if error occurred

Last update 27-July-2009

6

tamkamal@hotmail.com

Oracle Personalization

Calling DB Function in Personalization

11- Stop insert by using Built in Type, you must use RAISE
FORM_TRIGGER_FAILURE

12- Test your work by click [B] Validate 13- Save your work

Last update 27-July-2009

7

tamkamal@hotmail.com

Sign up to vote on this title
UsefulNot useful