Making the Account field a strict option list

accountField1.jpg
Someone recently asked me about changing the behavior of the Account field to make it a strict option list instead of an edit and select list. The reason the field is an edit field with a list by default is because of the flexible and hierarchical nature of Accounts. The Managing Security and User Access guide in chapter 4 gives details on how that works.

But in this person's particular case, they wanted users to stick to the strict list of defined Accounts and not be able to deviate from that by adding additional suffix parameters to the Account (for example).

With a custom component, this can certainly be accomplished. But with some creative use of Rules, this can be done with just configuration. And I'm always in favor of configuration over customization.

The first step is to create a new custom metadata field. You can name it Account (xAccount) or similar value. Check the 'Enable Option List' and Configure. For the Option List Type, select 'Select List Validated'. This will make it a strict option list. Check the 'Use view' radio button and select 'Document Accounts' from the list.

accountField2.jpg

Update the database design to add the new field and rebuild the search index (if necessary).

Now create a new Rule. You can make it a global rule if you always want it to take effect or apply it to your specific Profiles. Go to the Fields tab and add the Account field (the system one, not the new one just created). It should be directly under Security Group. Change its Type to 'Hidden'. Then click the 'Is derived field' check box and click the Edit button. Go to the Custom tab and click the Custom check box. Add this line of code:

<$dprDerivedValue=xAccount$>

xAccount will be for whatever you named your custom metadata field.

accountField4.jpg

OK the new Rule. Apply the rule to your Profiles (if not global) and position the field if desired.

accountField5.jpg
Now we have our strict list Account field! We're basically controlling the display with our custom field and using the Rule to keep it in synch with the system's Account field.

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Kyle Hatlestad is a Solution Architect in the WebCenter Architecture group (A-Team) who works with WebCenter Content and other products in the WebCenter & Fusion Middleware portfolios. The WebCenter A-Team blog can be found at: https://blogs.oracle.com/ ateam_webcenter/

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today