Join the OracleApps88 Telegram group @OracleApps88to get more information on Oracle EBS R12/Oracle Fusion applications.

If you are facing any issues while copying the Code/Script or any issues with Posts, Please send a mail to OracleApp88@Yahoo.com or message me at @apps88 or +91 905 957 4321 in telegram.

Friday, November 29, 2013

Creating WF Local Roles: Script to Create an Adhoc Roles




Adhoc roles can be created through PL/SQL from database or they can be created from Applications using User Management Responsibility.
If PL/SQL is used to create roles, all user names and role names in UPPER case to avoid some errors:

Script to Create an Adhoc Role:
-------------------------------
DECLARE
   vRole     VARCHAR2(100) := 'XAOATESTROLE';
   vRoleDesc VARCHAR2(100) := 'XAOATESTROLE';
BEGIN
   wf_directory.createAdhocRole(    vRole,
                                    vRoleDesc,
                                    NULL,
                                    NULL,
                                    'Test Role for All Oracle Apps users',
                                    'MAILHTML',
                                    'OPERATIONS', --USER NAME SHOULD BE IN CAPS 
                                    NULL,
                                    NULL,
                                    'ACTIVE',
                                    NULL
                                 );

   dbms_output.Put_line( 'Created Role'
                         ||' '
                         ||vRole);
   COMMIT;                       
END;
/

Result:

Created Role XAOATESTROLE

No comments:

Post a Comment

If you are facing any issues while copying the Code/Script or any issues with Posts, Please send a mail to OracleApp88@Yahoo.com or message me at @apps88 or +91 905 957 4321 in telegram.
Best Blogger TipsGet Flower Effect