Custom Search Screen should retain results when user navigate away from the search screen and return to it

By | July 20, 2009

As per the standard Sage CRM functionality, Company (any Standard Entity i.e. Person, Communication, Lead, Opportunity, Cases) search screen retains results when user navigate away from the search screen and return to it.

Bur this is not applicable for any custom entity search screen. Custom search screen does not display search results when user navigates away from this screen and then return to it.

Here I would like to share some interesting things regarding mechanism of standard search page (which has been created though Entity Wizard).

The mechanism of search page is based on page mode (eWare.Mode). In the standard search page find button is the default container button. So, it handles the eWare.Mode automatically. Let me explain how the standard search page will work:

Suppose we have a custom entity called Item and the search screen for Item entity. Along these we have also one ASP page (search page) for searching the Items record in CRM. This page has been creating from Entity wizard. In this page there is no Find button, it is the default container button. We have one Clear button on the screen which blanks out the search results. When we click on the Find à Item, a search screen will get appear along with two buttons Find and Clear. At this time the page mode (eWare.Mode) is 1. When we click on the Find button a grid will get display with the search results. At this time the page mode (eWare.Mode) is 2. And when we click on the Clear Button, the search grid will get disappear, only search screen will be there. At this time the page mode (eWare.Mode) is 6. If user navigates away from the search screen and then return to it then the value of the page mode becomes again 1. In the page, the search grid is added in the container when the page mode is not equal to 6 and not equal to 1. In other words you can say that the search grid display only when the page mode is 2. This is the standard functionality of the search screen and search page.

Now, if you want to retain the search results, then it is much doable task. We will need to do some customization in the ASP search page in which we will need to maintain the current session. If user is in the same session then we will need to display the search grid as well as the search screen.

If you find this content useful, Please drop us an email at crm@greytrix.com.