The purpose of this mapping is to override the predefined columns that appear on the related and popup lists for a module. Each module has two hardcoded lists of columns, one defines the columns that are shown when the module is on a related list (list_fields) and the other defines the columns that are shown in the module's popup capture screen (search_fields). Many times we want to be able to change these columns because the default ones aren't important for us or some users need more information in the popup screen. Using the List Columns mapping you can adapt these lists to your requirements without modifying the code.
The accepted format is:
<map> <originmodule> <originid>22</originid> {optional} <originname>{ModuleName}</originname> </originmodule> <relatedlists> <relatedlist> <module>{parentmodule}</module> <linkfield></linkfield> <columns> <field> <label></label> <name></name> <table></table> {optional} <columnname></columnname> {optional} </field> ... </columns> </relatedlist> .... </relatedlists> <popup> <linkfield></linkfield> <columns> <field> <label></label> <name></name> <table></table> {optional} <columnname></columnname> {optional} </field> ... </columns> </popup> </map>
where we can define a different set of columns per related lists and one for the popup screen.
The name of the mapping must be {ModuleName}_ListColumns and the name of the global variable, if you need it to be per user, would be: BusinessMapping_{ModuleName}_ListColumns
The way to understand this map is like this:
this Potentials_ListColumns map is for Potentials lists, when you show a list of potential records, in the Contacts module I want you to show these columns, when you show that list in Accounts I want you to show these others,… when you open a popup to select a potential record I want you to show these
so, all the field references must be fields that are on the Potentials
if you want to change how contacts appear in their lists then you have to create a Contacts_ListColumns and open a relatedlist section for Potentials