HOWTO: Drop a ListView in anywhere with the ListViewFacade

sugarcrmdevelopers —  May 15, 2012 — 1 Comment

I’ve come across requests every so often to embed a ListView into a view you are building. This is actually quite simple to do, thanks to the ListViewFacade class. This class provides a unified interface to getting a ListView, whether the module is using the current Smarty based ListViews or the older XTemplate based ones.

Check out the below code snippet, which will drop the Accounts ListView on any view form. It supports pagination as well as re-ordering like a normal ListView does.

One response to HOWTO: Drop a ListView in anywhere with the ListViewFacade

  1. 

    So, could this be used to put a list view on an edit view page?  I’ve wanted to have quotes show up while i’m editing some customer specific fields in the Account Edit View page.  If so would I toss the code at the bottom of the display method?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s