on 06-14-2011 11:23 AM
Hi Experts,
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.
Try this:
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.
<chtmlb:config
/>
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vignesh,
Is your view sitting in a view set?
If it does, what I have done is to create a copy of the view with a separate configuration that I wanted. Then in the Viewset controller, DO_REPLACE_INITIAL_VIEW method, I replace the entire view.
It worked for me very well because and worth the effort as the configuration of both screen is very different. If you are talking about doing it for very minimal difference, this could be overkill but it is one way of doing it.
Hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please check if this helps in anyway.
http://wiki.sdn.sap.com/wiki/display/CRM/Dynamcallyhidinganassignmentblock
Rg,
Harshit Kumar
Hi,
u can do that by changing the code in the method prepare_xml
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.