Tuesday, June 27, 2006

How to create notification against custom fields?

  • create a field called "email cc"
  • associate a validation. Use existing validation that refers to email address, but modify it so that email appears as the second field (which is the visible parameter).

P - always is #1 ie: invisible parameter eg: user_id
VP - always is #2 ie: visible parameter eg: email

The validation used and modified is knta- user id - enabled:
select user_id, full_name, username, department_meaning, email_address
from KNTA_USERS_V users
where ((UPPER(first_name) like UPPER('?' || '%')
AND (first_name like upper(substr('?',1,2)) || '%'
OR first_name like lower(substr('?',1,1)) || upper(substr('?',2,1)) || '%'
OR first_name like upper(substr('?',1,1)) || lower(substr('?',2,1)) || '%'
OR first_name like lower(substr('?',1,2)) || '%'))
OR (UPPER(last_name) like UPPER('?' || '%')
AND (last_name like upper(substr('?',1,2)) || '%'
OR last_name like lower(substr('?',1,1)) || upper(substr('?',2,1)) || '%'
OR last_name like upper(substr('?',1,1)) || lower(substr('?',2,1)) || '%'
OR last_name like lower(substr('?',1,2)) || '%'))
OR (UPPER(full_name) like UPPER('?' || '%')
AND (full_name like upper(substr('?',1,2)) || '%'
OR full_name like lower(substr('?',1,1)) || upper(substr('?',2,1)) || '%'
OR full_name like upper(substr('?',1,1)) || lower(substr('?',2,1)) || '%'
OR full_name like lower(substr('?',1,2)) || '%'))
OR (UPPER(username) like UPPER('?' || '%')
AND (username like upper(substr('?',1,2)) || '%'
OR username like lower(substr('?',1,1)) || upper(substr('?',2,1)) || '%'
OR username like upper(substr('?',1,1)) || lower(substr('?',2,1)) || '%'
OR username like lower(substr('?',1,2)) || '%')))
[FILTER_FIELD_SQL]
AND NVL(start_date, SYSDATE) <= SYSDATE
AND NVL(end_date, SYSDATE + 1) > SYSDATE
order by full_name

Change "select user_id, full_name, username, department_meaning, email_address" to
select user_id, email_address, full_name, username, department_meaning"

Modify the columns in the column headers:
  • user id - invisible parameter #1
  • full name - visible parameter #2
  • username
  • department
  • email

to:
  • user id- invisible parameter #1
  • email - visible parameter #2
  • full name
  • username
  • department

Go into the workflow step that you want to send a notification from and set up the following:
  • Set receipient type to email address
  • Add in the name of the user defined token [REQD.VP.EMAILCC]
  • Add in the text of the email template.

0 Comments:

Post a Comment

<< Home