Dynamically hide attributes in the configuration
Problem : I need to display or hide an attribute depending on some logic. The attribute is present in the configuration.
We have CRM 7.0 system with enhancement pack installed. The catch here is that I must not use "DO_CONFIG_DETERMINATION" method. Doing that requires 64 sub-object types to be maintained in the configuration.
Thanks in advance for your replies.
In the html page of your form view, add the following code at the beginning of the page right after all those <%@extension> tags
<% data: lv_xml type string. lv_xml = controller->CONFIGURATION_DESCR->GET_CONFIG_DATA( ). replace all occurrences of '//SOLDTO/STRUCT.PARTNER' in lv_xml with ''. %>
The "//SOLDTO/STRUCT.PARTNER" will be the technical name of your field.
Then find the following tag in the html page.
Add the parameters in the tag if it is not there
xml = "<%= lv_xml %>"
The final will looks like this
<chtmlb:config xml = "<%= lv_xml %>" mode = "RUNTIME" />
The field should disappear.