Monday, August 24, 2009

How To Set Email Style Preference For All Users At Once?

Applies to: Oracle Workflow Cartridge - Version: 11.5.9 to 11.5.10Information in this document applies to any platform.

Goal
The goal of that Note is to explain how to bulk update the Email Style preference for all E-Business Suite users at once. The same can be used to update the Email Style for a group of users only, for instance the users who have the preference set to "Disabled" ...
Usually, each user must reset the Email Style preference through the "Preferences" page available from his Home Page.

Solution
1. Unfortunately, currently there is no seeded way to do this. An enhancement request has been logged for this under Bug 5748131 (NEED PLEASANT WAY TO BULK RESET NOTIFICATION PREFERENCE FROM DISABLED).It is under Oracle Development's review ...
2. Currently, the only workaround to change the Email Style of all users is to update the tables.Note that there are 2 tables to update :
FND_USER_PREFERENCES and WF_LOCAL_ROLES.
NB:You should backup those tables before performing the updates.
3. Updates for All Users would look like :
a.
update wf_local_roles set notification_preference='' where orig_system in ('FND_USR','PER');
b.
update fnd_user_preferences set preference_value='' where preference_name='MAILTYPE' and
module_name='WF' and user_name <> '-WF_DEFAULT-';

4.
Updates for Users having the preference set to "Disabled" would look like :
a.
update wf_local_rolesset notification_preference=''where orig_system in ('FND_USR','PER')and name in(select user_namefrom fnd_user_preferenceswhere preference_name='MAILTYPE'and module_name='WF'and preference_value='DISABLED');b. update fnd_user_preferencesset preference_value=''where preference_name='MAILTYPE'and module_name='WF'and preference_value='DISABLED';

The where clauses of above SQL can be modified to match your needs

NB : Possible values for are :

QUERY (corresponds to preference value "Do not send me mail")
MAILTEXT (corresponds to preference value "Plain text mail")
MAILATTH (corresponds to preference value "Plain text mail with HTML attachments") MAILHTML (corresponds to preference value "HTML mail with attachments")
MAILHTM2 (corresponds to preference value "HTML mail")
SUMMARY (corresponds to preference value "Plain text summary mail")
SUMHTL (corresponds to preference value "HTML summary mail")
DISABLED (corresponds to preference value "Disabled")

ReferencesNote 360541.1 - 11.5.10 Users notification preference becomes Disabled in table FND_USER_PREFERENCES table

No comments: