Creatio has a quick and easy way to build a detail area (a.k.a. one-to-many relationship). You've probably already tried using the detail wizard and bpm'online auto-magically generated the functionality for you behind the scenes. So easy!
Let's take that one step further. Let's use Wonka Industries as our example. Wonka Industries wants to be able to see the top three years of revenue by each client to determine the company's sweetest years with that client. The revenue is tabulated and available in Creatio, but Wonka wants sales reps to see only a snapshot display of the top three years.
So, we must use a little bit of code to accomplish three tasks:
- Sort the data by revenue so the highest revenue years show up first
- Add a limit so only three revenue records show up at once
- Remove the "Load More" link so a user doesn’t think they need to click, therefore receiving unnecessary data
Let's start with the basics. Use the detail wizard and you will get a result like below. All the data associated with this account is displayed.
Now we add the code to specify what we want to display:
And just like that, the detail area is filtered to display only the top three rows.