This week Clemente Raposo, Lead Developer of SuiteCRM, explains how to use View Definition Mappers to add Record Panel Display Logic in SuiteCRM 8.

View Definition Mappers are designed as a plugin friendly solution to override metadata that will impact frontend display. They allow you to transform the module metadata before it is sent to the frontend. Like other mappers in SuiteCRM 8, ViewDefinitionMappers work independently, so it is possible to add as many as you need and can be defined to apply across all modules or just for a specific module. Overall, View Definition Mappers are a great way for you to extend SuiteCRM 8 to work just the way you want it to.

In today’s example, we are going to demo an alternative way to define panel display logic in the record view, using an example that will show/hide the Contacts module “More Information” panel depending on the value set on first name, last name and mobile phone fields. Watch this week’s video to learn all about View Definition Mappers, and be sure to check below to get the code example you need, to help you get started.

For those of you who are keen to get started, you can find the code sample from the video below:

Copy to Clipboard

extensions/defaultExt/modules/Contacts/ViewDefinitions/Mappers/ContactsHideMoreInfoPanel.php

The above can be used as an example to add your own custom panel display logic to the Record View in SuiteCRM 8.

If you are looking for more development insights, the Development Team here at SalesAgility have created instructor-led Masterclasses.  Designed for developers, covering both SuiteCRM 8.x and SuiteCRM 7.x, head over to the MasterClasses to find out more.

About SuiteCRM

SuiteCRM is one of the world’s most popular CRM applications. Our feature-rich enterprise-ready alternative to Salesforce enables your sales teams to sell, market & service smarter. Providing all the benefits of CRM at substantially lower costs, with the freedoms and flexibility of Open Source.

You can download and host SuiteCRM on your own servers, in the public cloud / private cloud or try our SAAS offering SuiteCRM Hosted. It is the ultimate freedom, allowing you to stay in full control over your business data. Try SuiteCRM for free here.

Help support the SuiteCRM project by becoming a sponsor today!