This document gives a short introduction about how a field is hidden in the runtime by view modification. If you would like to know the “magic” occurred behind the scene, you could find them in this document.

In order to hidden the tab “Participants”, we have to first identify the technical id of this tab: salesTeam

/wp-content/uploads/2015/06/clipboard1_723698.png

And then hidden the field via view modification.

/wp-content/uploads/2015/06/clipboard2_723699.png

Runtime implementation

1. the view Modification we defined in the extension component’s component.js is loaded in the runtime.

/wp-content/uploads/2015/06/clipboard3_723700.png

2. All the controlls defined in opportunity detail view (an xml view ) are rendered one by one. As this is an xml view, the method in XMLTemplateProcessor.js is called. The screenshot below shows the timeslot when the “Participants” tab is to be rendered.

Check all the attributes at this time in variable mSettings: there is no attribute like visible yet.

/wp-content/uploads/2015/06/clipboard4_723701.png


3. Then the visible configuration parsed from step1 is merged into standard settings mSettings via the jQuery.extend method:

/wp-content/uploads/2015/06/clipboard5_723702.png

Final settings for “Participants” tab:

/wp-content/uploads/2015/06/clipboard6_723703.png

4. loop all attributes of current tab, when visible attribute is iterated, set the property “visible” to value “false” in line 897, so the tab is invisible in the final rendered html page.

/wp-content/uploads/2015/06/clipboard7_723704.png

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply