Recent List Customisation

Hints, Tips and Tricks

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

Recent List Customisation

  • Comments 16
  • Likes
This article looks at how the recent list interacts with custom entities.

There are 4 components to consider that make up the functionality of an entity’s recent list:
• The code that adds a record to the recent list.
• The find hyperlink (entity name and image in the recent list) and the screen it loads.
• The data that displays as a hyperlink.
• The screen that loads when a recent hyperlink is clicked.

The code that adds a record to the recent list

The first topic is how does an ASP page add a record to the recent list? The convention is that when a user loads a summary page for an entity record to add the ID of the record to the recent list, this is done by the eWare object in the following code sample:
eWare.SetContext(“EntityName”, “EntityId”);
This actually adds the record to Users.User_RecentList field value, which is what the DLL reads to build a user’s recent list.

The Find Hyperlink

How do you change the label which displays as the entity name next to entity’s image in the recent list? You need to add the following translation:
Caption Code: << your entity name >>
Caption Family: RecentList
Caption Family Type: Choices
US Translation: << your label for the USA users>>
You can then translate the find label into any language.

How do you know what ASP page will called if the user clicks the “entity name” label? Well, the answer is that the DLL is hard-coded to look in the CustomPages directory for:
CustomPages/<< your entity name >>/<< your entity name >>Find.asp

So make sure you follow the above naming convention by adding a sub-directory of your entity name and then an ASP page with a file name of “your entity name” + “Find.asp”.

The Data that Displays

The data that displays in the list is defined by the following translation record:
Caption Code: NameColumn
Caption Family: << your entity name >>
Caption Family Type: Tags
US Translation: << your field name for the USA users>>
The only limitation I have found is that you can only enter one field name in the translation. In order to see your change you will have to clear out the list.


The screen that loads when a recent hyperlink is clicked

The screen that is loaded when a record’s hyperlink is clicked in the recent list is defined the following translation record:
Caption Code: SummaryPage
Caption Family: << your entity name >>
Caption Family Type: Tags
US Translation: << your ASP page name for the USA users>>

There is one important note the DLL is hard-coded to look in the CustomPages directory for a directory of your entity name, so if the US translation page name was “DilbertSummary.asp” and the entity was called “ScoobyDoo” the DLL would make the hyperlink point to:
CustomPages/ScoobyDoo/DilbertSummary.asp
This does require an IISRESET before your change will be testable.
Comments
  • I tried to customise the recent list data displayed for Orders.  To start with there were no translations for Caption Code: NameColumn.  I added one as:

    Caption Code: NameColumn

    Caption Family: Orders

    Caption Family Type: Tags

    US Translation: Orde_Reference

    I also put Orde_Reference in all the other translation fields.  I cleared the recent list, then navigated to an order.  The recent list then showed the order, but still displayed the description instead of the reference.  I tried resetting IIS and repeating the test - no difference.

    Am I missing something?  How do I make this work?

    Thanks

    Paul

  • The information above is only relevant for new custom entities.  So for a System Entity like Orders this will not apply.  The recent list is managed from within the DLL for system entities.

  • If we are creating a 6.2 .net customization, do we have to create an asp page that does a redirect to our custom entity summary page to get the recent jump to work?

  • As far as I can work out it doesn't matter what's in the 'SummaryPage' caption for .NET entities. The recent link gets set based on whatever the current DLL and function names are when you call SetContext().

    The find link on the recent list headers doesn't work - you need to do some hacky  ASP redirect.

  • A little trick to add multiple fields to the recent list is to simply create a "dummy" text field with enough length to hold your multiple field values. Create a TLS (or SQL trigger) to update this new field with the multiple field values. Use that dummy field as the recent list field.

    For example I have a new entity called "Houses". I want the recent list to include the House ID, House Address, House City and House State. Create a dummy field called hous_recentdesc that is 80 char in length. Create your TLS or trigger to update the hous_recentdesc with hous_houseid+' '+hous_addr1+' '+ hous_city+', '+hous_state.  Change the NameColumn value of Houses in Translations to be hous_recentdesc. Voila, a "multi-field" recent entry.

  • Thanks for this tip ! Very usefull for me.

  • Does anybody know how to remove an item from the recent list, when deleting a record using the .NET API?

  • Did anyone find a way to remove a recent list item??

  • Ken and Daniel

    This article may give you an idea.  community.sagecrm.com/.../clearing-the-recent-list-using-custom-clientside-code.aspx

  • Thanks Jeff, useful tips!

  • Hi Jeff,

    I have tried using the above tips however in the recent list i am still recieving the id's for records rather than the name. So under the custom entity (Pet) is a list of ID's rather than the pet_name field we have specified using the above translation.

    Using CRM 7.2 so not sure if the above is still relevant for this version?

    Thanks

    Danny

  • Hi all,

    It is possible to add Communication entity in Recent List?

    Thanks,

    regards

  •  @jeff , its quite useful article but what if custom entity is made through DOT NET DATAPages and there is no ASP PAGE (e.g SummaryPage.asp).  I have used the above convention but its not showing right page when i click on entity in recent list ??

    Please advise.

    Thanks

    ##crm  ##crm73stomASP

  • Have a look at the earlier comments that discuss entities and the .NET API.

  • Hi Jeff

    I've increased the no of records in the history to 40 BUT because I have a large number of custom entities the recent list seems to apportion this over the number of entities. So I only see 3 records against my most popular entity as the rest happen to have been based on me visiting less common entities.

    If I clear history, I start off OK, but again once accessing some lesser used entities the number recorded per entity is reduced. Is there a way of apportioning the history to key entities or will I have to remove the 'not so critical' entities from my history record? Thanks