This article discusses some important changes to the way ASP pages are rendered in Sage CRM 7.2 b and the problems you may encounter with existing customisations and how to resolve them.
Note: this article describes how the product behaves in Sage CRM 7.2 b, things were different in Sage CRM 7.2 GA and have been improved upon vastly. Needless to say it is recommended you use patch b.
Before we begin lets name some elements of the Sage CRM Screen:
There are two parts: the main frame where the content is rendered, and what we call the "L" which encompasses the menu, the recent button the Sage CRM Logo and the "top content".
Why have things changed?
In Sage CRM 7.2 we improved the User Interface by removing the HTML Framesets, which was a major change to the way Sage CRM pages are rendered. To the end user things look pretty much the same except that now there is no history back and forth buttons and the user can use the built-in browser functionality to navigate history.
ASP pages used to be rendered within a frame and only needed to render the horizontal tabs (if any) and the page content itself. Now ASP pages render within the main browser window and so they need to render the entire page, "L" included.
What problems could I encounter?
For the most part things should just work, however if your page is not using the API correctly you could encounter one of the following problems:
- The "L" is missing
- There are too many "L"s
What to do if the "L" is missing from a page?
The API method to render the page is called CRM.GetPage. Typically you build the page in chunks using CRM.AddContent calls and then render to the browser using Response.Write(CRM.GetPage()).
In this case the CRM.GetPage method is probably not getting called. It is likely that your asp page is generating HTML and sending it directly to the browser using Response.Write calls. These calls need to be changed to CRM.AddContent calls instead, this will add the HTML strings to a buffer which can be written to the response stream with Response.Write(CRM.GetPage());.
The CRM.GetPage method will output the entire HTML document, including all the HTML necessary to render the L and the top tabs. There should be nothing written to the stream before or after it. There should only be one Response.Write call.
You can read more about the GetPage and AddContent methods in the online developer help.
What to do if there are too many "L"s on a page?
You may see the "L" appear in pop-up windows and within iframes where you previously did not see it. In these cases you will need to change your GetPage calls to GetPageNoFrameset calls instead. GetPageNoFrameset is a new method, it's usage and function is exactly the same as GetPage except it does not render the "L".
Below is an example of what happens to a page that is using the iframe workaround to render two lists on the same page upon upgrading to 7.2b:
As you can see three Ls have been rendered, one for the main window and one for each iframe. The simple fix is to change the calls to GetPage to GetPageNoFrameset.