Above is a screen shot that shows a default opportunity summary page. At the top of the page is the frame that contains the TopContent information. Sometimes this is called the context information. In this screen the TopContent brings in data from the Opportunity, the Company and the Person entities. The Phone and Email information actually comes from the Company table.
Control of the TopContent typically comes in two forms. Either we will want to add more information into the TopContent area or we will want to remove data from the TopContent frame.
I will look at both in turn. Adding Data to the TopContent area.
Each default main entity in CRM has an extra screen block defined in Meta Data to allow us to add additional content to the screen.
For the Opportunity Entity this is called OppoTopContent.
You can find this screen under the Screen tab within the Administration -> Customization -> Opportunity area.
Default TopContent Screens Cases
- CaseTopContent Communication
- CompanyTopContent Lead
- LeadTopContent Opportunity
- OppoTopContent Orders
- OrdersTopContent Person
- PersTopContent Quotes
Although it is possible to add additional fields to the TopContent area consideration has to be given to the space available and what effect this is going to have on the appearance and readability of the screen.
In the example below I have added two fields into the OppoTopContent screen.
Here we can see that I have used the Create script to change the properties of the field being included. This concept is very important and I'll come back to this later in the article when discussing the display of derived or extra information.
The fields added to the TopContent are then displayed as we can see.
So we have seen that we can include additional information into the TopContent area of the screen for default entities. We can actually do this for Custom Entities too.
In the image above we can see that I have added TopContent information into the screen for the new Project entity.
The screen I used is called ProjectTopContent. You can see how it was created in the image above.
The custom project entity was created as a new main or primary entity. To call the TopContent screen in the ASP pages I used the method CRM.GetCustomEntityTopFrame("Project");
This method assumes that for the project entity there is a screen called ProjectTopContent. This means that if you create a new main entity (e.g. XXXXX
) you should create a screen called XXXXX
TopContent. Displaying Derived Information in the TopContent area.
We saw with the default entities that we can add additional fields from that entity into the TopContent area. But that is a limitation. We can add Company fields to our CompanyTopContent screen, we can add Opportunity fields into our OppoTopContent screen. But what if we wanted to add other data into the TopContent? For example how can we add a count of the total number of "In Progress" cases and opportunities into the CompanyTopContent screen? Other Limitations of the TopContent area.
There are a few important limitations to be aware of when working with the TopContent screens. The first is that these screens are only ever displayed in View mode. Therefore no onChange events can be used. And since nothing is going to be submitted so there are no Validation checks either.
One big thing to note is that the custom content box of the screen is not used. We can not put script into the custom content box and have it passed to the browser.
Also the TopContent screen is not rendered within html <FORM> tags and the data items displayed are not wrapped in the <span> tags with ID values that normally allow fields in the main display area to be easily addressed in clientside code.