Customisations not using GetPage() will break in Sage CRM 7.2b

Hints, Tips and Tricks

Technical Hints Tips and Tricks that cover customization and development using Sage CRM. API usage and coding are covered.

Customisations not using GetPage() will break in Sage CRM 7.2b

  • Comments 5
  • Likes

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.


Comments
  • Please also see:  community.sagecrm.com/.../sage-crm-7-2-making-sure-upgraded-asp-pages-work-correctly.aspx

  • Yes, we are having this problem on 7.2A (with all the correct GetPage() calls), requesting 7.2B now, I'll report back on whether this resolves the problem.

  • Yup, fixed it

  • Would it be at all possible for the those of us on the developer program to get notifications about changes like this? Our add on software lives on the API so this type of change without us knowing loses us new business and can damage our relationships with our customers. Let us see some CRM in practice.

  • Hello Dear Friends, I hope you are doing well. I have question I hope you could send me a quick answer. I have a client which wants to use sage CRM with out integration with sage 100, but they want to install the CRM on MAC. Please tell me if that's possible and are there any problems while working on it, additional what type of browsers may I use with mac .