Enable custom extension attributes for Profiles
Overview
Extend the Profiles application by adding custom extension attributes.
To edit configuration files, start wsadmin.sh
In addition to different attribute layouts, Profiles supports extension attributes for every profile type. Because all profiles share one schema, an extension attribute, such as customers, has the same semantic meaning for all profile types. However, we can choose to associate a particular attribute with a profile based on profile type. The attributes are declared in the profiles-config.xml file located in the was_profile_root/config/cells/cell_name/nodes/node-name/LotusConnections-config directory.
Although changes to profiles-config.xml should generally be made using wsadmin client scripting, there are no wsadmin commands to modify the profilesDataModel, so we can make changes to the profilesDataModel using a text editor.
Add a custom extension attribute to the My Profile page
- Check out the Profiles configuration files:
app_server_root/profiles/Dmgr01/bin
./wsadmin.sh -lang jython
execfile("profilesAdmin.py")
ProfilesConfigService.checkOutConfig("/tmp", "cell_name")To determine cell name:
print AdminControl.getCell()
- Save a copy of profiles-config.xml.
- Open the file in a text editor.
- To define the extension attribute, add it to the <profileExtensionAttributes> element under <profileDataModels> as shown in the following sample:
<profileDataModels> <profileExtensionAttributes> <simpleAttribute extensionId="property1" length="64"/> <simpleAttribute extensionId="property2" length="64"/> <simpleAttribute extensionId="property3" length="64"/> </profileExtensionAttributes> <profileDataModel> ... </profileDataModel> ... </profileDataModels>For example:<profileDataModels> <profileExtensionAttributes> ... <simpleAttribute extensionId="spokenLang" length="64" /> <simpleAttribute extensionId="TechExperience" length="64" /> <simpleAttribute extensionId="officeAddress" length="64" /> <simpleAttribute extensionId="homeAddress" length="64" /> </profileExtensionAttributes> </profileDataModels>
- Check the configuration files back in during the same wsadmin session in which you checked them out for the changes to take effect.
Parent topic:
Extension properties in the data model
Related:
Specify a custom field as required and declaring maximum field length
Related reference:
Create a simple profile data model and template customization