cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Attribute not available in Available Fields section of Configuration

Former Member
0 Kudos

Hi Experts,

My requirement is to add a custom search field in contact search screen. For that i tried various options

Option1

Added a model attribute in component/view BP_CONT SEARCH/Search. The attribute got successfully added. But when i opened the Configuration tab, i could not see the attribute in the available fields.

Option 2

In the view CRMVC_SDESIGN, i created a new entry for my attribute in object type: BP_CONTACT and design object . But doing so, i got an error and was not able to add my attribute

Option3

Since the View context node 'Search' is bound to the Component Controller Context node 'Search'. I created my custom attribute in compoennt controller also. But this also did not help.

Option 4

I deleted the enhancement of the view and created a new enhancement. I created a value node in Search context node. But still the attribute is not available in the Availble Fields in the Configuration of component/view BP_CONT_SEARCH/SEARCH.

Kindly provide your valuable suggestions to resolve this issue.

Regards,

Radhika

Edited by: Radhika Chuttani on Jan 6, 2012 7:28 AM

Accepted Solutions (1)

Accepted Solutions (1)

Hi Radhika

Did you try creating a new configuration?

Regards

Leon

Former Member
0 Kudos

Hi Leon,

I did try that also, but still the field was not listed.

Regards,

Radhika

Former Member
0 Kudos

Hi Radhika,

you need to add your Z field to BOL strucure CRMT_BUPA_IL_CONP_SEARCH ( context node search, Dynamic Query Object BuilContactAdvancedSearch ) manually through Append Structure. once added you can see those fields in configuration. later on you can restrict the values in result on event EH_ONSEARCH on basis of your Z field.

Hope it helps !

Thanks

Sudhir Grover

0 Kudos

Hi Radhika,

You need to enhance the search query structure as well in order to get the field in the configuration.

You can find the BOL structure for the corresponding context node bol model.

In your case, the BOL model is the search object 'BuilContactAdvancedSearch'.

The corresponding structure can be found at the BOL Model Browser, under Dynamic Query Objects

for the search object 'BuilContactAdvancedSearch'. The corresponding structure 'CRMT_BUPA_IL_CONP_SEARCH'

has to be enhanced with the new custom attribute. Only then, this field would be available in the configuration

when the following htm code gets executed when you open the configuration tab.

<thtmlb:advancedSearch id                = "advs0"
                                 fieldMetadata     = "<%= controller->GET_DQUERY_DEFINITIONS( ) %>"
                                 header            = "<%= SEARCH->get_param_struct_name( ) %>"
                                 fieldNames        = "<%= controller->GET_POSSIBLE_FIELDS( ) %>"
                                 values            = "//SEARCH/PARAMETERS"
                                 maxHits           = "//SEARCH/MAX_HITS"
                                 ajaxDeltaHandling = "false"
                                 onEnter           = "search" />

Here you can see that, it reads the parameter structure using the method SEARCH->get_param_struct_name( ) of

the context node.This is used for configuration as well.

Also if you have an F4 help for your custom attribute, you have to add it in the GET_DQUERY_DEFINITIONS( ) of the

view controller. These additional information will help you to understand better.

Regards

Leon

[SAP Community Network Forums on mobile|https://cw.sdn.sap.com/cw/ideas/7910]

Answers (1)

Answers (1)

Former Member
0 Kudos

By default, your custom attribute will not appear in the 'Available Fields' list. It is always necessary to add it first to the Design layer, which is where the CRM web UI reads its data from.

Solution 1: Go to SPRO > CRM > UI Framework > UI Framework Definition > Design Layer > Deactivate Hiding of Fields

The problem could indeed be solved by 'Deactivating the Hiding of Fields', but this means that all custom fields will always be available throughout the system in the future. It is therefore recommended to only expose the fields that are needed, using the simple technique in solution 2.

Solution 2: Go to SPRO > CRM > UI Framework > UI Framework Definition > Design Layer > Define Design Objects

- Select the desired object type (e.g. BT111H_OPPT, BT126_CALL, etc.).

- From the 'Design Object' list, select the context node that you added the attribute to, and click 'Design'.

- In the 'Design' list, click 'New Entry'.

- Enter in the 'Attribute Name' field the name of your attribute, but leave all other fields blank (see image). Ignore the warning that pops up by clicking OK.

- Your attribute will now be available in the customizing screen in the web UI.

Regards,

Jonathan