Tuesday, September 15, 2015

Form Personalization - Basics




Please refer to oracle metalink note - How To Do Forms Personalization (Doc ID- 468657.1)

This note contains a demonstration viewlet which explains the steps to do form personalization for the following tasks

1) How to change the Label Description?
2) How to make the field Mandatory?
3) How to Remove Certain Fields?
4) How to hide Tabs?
5) How to change tab label details?
6) How to control position of radio button?
7) How to set initial values to field?
8) How to make field’s not updatable?
9) How to Create PO with Promised date greater than sysdate?
10) How to add special Menu and Actions?


Thursday, September 3, 2015

Script to view all Form personalization by responsibility



  SELECT fpt.application_name,
         ff.form_name source_form_name,
         fft.user_form_name,
         fft.description form_description,
         fff.function_name,
         ffft.user_function_name,
         ffft.description function_description,
         ffcr.sequence personalize_rule_sequence,
         ffcr.description personalize_rule_description,
         DECODE (ffcr.rule_type,  'F', 'Form',  'A', 'Function')
            personalize_rule_level,
         ffcr.enabled personalize_rule_enabled,
         ffcr.trigger_event personalize_rule_event,
         ffcr.trigger_object,
         ffcr.condition personalize_rule_condition,
         DECODE (ffcs.level_id,
                 10, 'Industry',
                 20, 'Site',
                 30, 'Responsibility',
                 40, 'User')
            context_level,
         DECODE (ffcs.level_id,
                 10, '',
                 20, '',
                 30, frt.responsibility_name,
                 40, fu.user_name)
            context_level_value,
         ffca.sequence action_sequence,
         DECODE (ffca.action_type,
                 'P', 'Property',
                 'M', 'Message',
                 'B', 'Builtin',
                 'S', 'Menu',
                 '')
            action_type,
         ffca.summary action_description,
         ffca.enabled action_enabled,
         DECODE (ffca.language,
                 '*', 'All',
                 'US', 'American English',
                 'AR', 'Arabic')
            action_language,
         DECODE (ffca.action_type, 'P', ffca.object_type, NULL)
            action_object_type,
         DECODE (ffca.action_type, 'P', ffca.target_object, NULL)
            action_target_object,
         DECODE (ffca.action_type, 'P', ffcpl.property_name, NULL)
            action_property_name,
         DECODE (
            ffca.action_type,
            'P', DECODE (
                    ffca.argument_type,
                    'B', DECODE (ffca.property_value,  '5', 'FALSE',  '4', 'TRUE'),
                    ffca.property_value),
            NULL)
            action_property_value,
         DECODE (
            ffca.action_type,
            'M', DECODE (ffca.MESSAGE_TYPE,
                         'S', 'Show',
                         'E', 'Error',
                         'W', 'Warning',
                         'H', 'Hint',
                         'D', 'Debug'),
            NULL)
            action_message_type,
         DECODE (ffca.action_type, 'M', ffca.MESSAGE_TEXT, NULL)
            action_message_text,
         DECODE (ffca.action_type, 'B', ffca.builtin_type, NULL)
            action_builtin_type,
         DECODE (ffca.action_type, 'B', ffca.builtin_arguments, NULL)
            action_builtin_arguments,
         DECODE (ffca.action_type, 'B', ffca.menu_argument_long, NULL)
            action_builtin_parameters,
         DECODE (ffca.action_type, 'B', ffca.menu_argument_short, NULL)
            action_builtin_code,
         DECODE (ffca.action_type, 'S', ffca.menu_entry, NULL)
            action_menu_entry,
         DECODE (ffca.action_type, 'S', ffca.menu_label, NULL)
            action_menu_label,
         DECODE (ffca.action_type, 'S', ffca.menu_seperator, NULL)
            action_menu_seperator,
         DECODE (ffca.action_type, 'S', ffca.menu_enabled_in, NULL)
            action_menu_blocks_enabled,
         DECODE (ffca.action_type, 'S', ffca.menu_argument_short, NULL)
            action_menu_icon_name
    FROM fnd_application fp,
         fnd_application_tl fpt,
         fnd_form ff,
         fnd_form_tl fft,
         fnd_form_functions fff,
         fnd_form_functions_tl ffft,
         fnd_form_custom_rules ffcr,
         fnd_form_custom_scopes ffcs,
         fnd_responsibility_tl frt,
         fnd_user fu,
         fnd_form_custom_actions ffca,
         fnd_form_custom_prop_list ffcpl
   WHERE                                           ----------------APPLICATION
        fp   .application_id = fpt.application_id
         AND fpt.language = 'US'
         ------------------------ FORM
         AND fpt.application_id = ff.application_id
         AND ff.form_id = fft.form_id
         AND fft.language = 'US'
         ------------------------ FUNCTION
         AND ff.form_id = fff.form_id
         AND fff.function_id = ffft.function_id
         AND ffft.language = 'US'
         ------------------------ Custom Rule
         AND ff.form_name = ffcr.form_name
         AND ffcr.function_name = fff.function_name
         ------------------------ Custom Scope
         AND ffcr.id = ffcs.rule_id
         AND ffcs.level_value = frt.responsibility_id(+)
         AND frt.language(+) = 'US'
         AND frt.responsibility_name =
         AND ffcs.level_value = fu.user_id(+)
         ------------------------ Custom Actions
         AND ffcr.id = ffca.rule_id
         AND DECODE (ffca.action_type, 'P', ffca.property_name, 79) =
                ffcpl.property_id
         AND DECODE (ffca.action_type, 'P', ffca.object_type, 'ITEM') =
                ffcpl.field_type
ORDER BY fft.application_id,
         ff.form_name,
         ffcr.function_name,
         ffcr.sequence,
         ffcs.level_id,
         ffcs.level_value,
         ffca.sequence

Special Triggers in Form



SPECIAL1 to SPECIAL45 triggers are used to define menu entries in form.

Below is the classification of special number triggers as per menu item

1-15  - Tools
16-30 - Reports/ Inquire
31-45 - Actions

Form Personalization - Changing LOV Query



If you want to change your LOV fields dynamically, follow 2 simple steps below

1) Create your own custom record group with SQL query




2) Attach this record group to desired LOV