Creating a view designed to return AJAX

sugarcrmdevelopers —  December 21, 2012 — Leave a comment

Came across a really good question on the forums around creating a view designed to return content for an AJAX request. This is a fairly common request, as with an AJAX request you want to leverage the built-in Sugar MVC layer to do handle the logic, but don’t want any of the extra UI bits of a normal request. Fortunately, there’s a view type that makes this easy.

Simply extend the view you are creating from the ViewAjax class instead of SugarView as shown below…

This gives you a normal view with the additional properties of hiding all the extra UI elements you don’t need.

No Comments

Be the first to start the conversation!

Leave a Reply

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

You are commenting using your 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