Wednesday, June 20, 2012

How to Update Email Style in Notifications Preferences

Hi All
Here the update statement for change Email Style in Notifications Preferences.
User preferences define what type of emails should be sent and also allows to turn off email notifications.

DISABLED  – Disabled
QUERY      – Do not send me mail
MAILHTM2 – HTML mail
MAILHTML – HTML mail with attachments
SUMHTML – HTML summary mail
MAILTEXT – Plain text mail
MAILATTH – Plain text mail with HTML attachments
SUMMARY – Plain text summary mail

Here the statement for changing the Preferences from 'Disabled' to 'HTML mail with attachments':

DECLARE
   --get users with email style is 'Disabled'
  cursor c1 is
         SELECT name
         FROM wf_roles
         where nvl(WF_PREF.get_pref(name, 'MAILTYPE'), notification_preference) = 'DISABLED';
BEGIN
  for c in c1 loop
    --change user preference to 'HTML mail with attachments'
    fnd_preference.put(c.name, 'WF', 'MAILTYPE', 'MAILHTML');
  end loop;
  commit;
END;

Good Luck ...

10 comments:

  1. is there a profile that we can update to fix this

    ReplyDelete
    Replies
    1. Hi, no need to update any profile. Can be done or by update or by updating user preferences.

      Delete
  2. Yes, I am entirely agreed with this article, and I just want say that this article is very helpful and enlightening. I also have some precious piece of concerned info !!!!!!Thanks. eth notifications

    ReplyDelete
  3. Really great..API to Update great!!!

    ReplyDelete