Skip to main content

Guide for Universal Table CMP users

About Us
Published by admin
27 January 2017
11

Universal table is a component for Salesforce.com, which allows creating a multi-function table with many useful features easily.

UniversalTableCMP consists of four parts: a component itself (UniversalTableCMP.component), its controller (UniversalTableController.cls), class to store records (NewRow.cls) and test class (TestUniversalTable.cls). The component creates the most versatile table that can be edited. It can work with 50000 rows.

To get started, four things need to be sent into the component with help of attributes:

  1. 'ListSize' – list of possible numbers of rows displayed per page. The first element will be applied. This attribute is not required. If a user does not send it into the component, the standard list will be applied.
  2. 'WhereCondition' – additional conditions for queries that will be placed after WHERE.
  3. 'ObjectsName' – a name of the SObject from which information for the table will be extracted.
  4. 'AllFields' - a special query that retrieves all the fields from the FieldSet. For example: SObjectType.ExOb__c.FieldSets.TotalFS.getFields(), where ExOb__c – SObject’s name, and TotalFS – name of this SObject’s FieldSet. The request may be triggered by the method of the controller.

It should look like this:

look

look

It is all that is necessary for the proper operation of the component.

The completed table looks like this.

guide

To move from page to page you should use image-links and links 'Next' and 'Previous'. If you are on the first or on the last page, then the appropriate link will be disable and you cannot press it.

On the right the current page number is displayed.

On the left user can set a number of rows displayed per one page. If you hover the cursor over the selectList, the information about displayed lines will pop up (the first and last row numbers, the total number of rows).

Next is the link 'optimum adjustment', pressing which you'll have a more accurate adjustment of each column width based on each record length.

guide-for-universal-table

If a user needs to sort the table by one of the columns, he should click on its title or arrow of this column. The arrow shows the order (ascending or descending) in which the table is sorted.

If you want to make a new record in the table, you need to press 'New'. This will open a popup of a standard page. After it closed your table will be reloaded automatically and a notification will appear. 'Edit' link works the same way.

If you want to delete a record from the table, press 'Del' link. After the operation, a notification will appear and your table will be reloaded automatically.

The component has a test coverage:

  1. UniversalTableControllerS – 100%.
  2. NewRow – 100%.

Question to the expert
Related Articles
All articles
Save the dates! Upcoming Salesforce events are here!
Training is an essential part of the person’s growth as a professional. Especially it’s important to learn something new for developers on an ongoing basis because they are the ones who meet unique business issues and create the best solutions that bring to life any client's wishes. Salesforce has always tried to provide all the partners with opportunities to learn and develop. We present you a useful list of upcoming events from Salesforce that can be an interesting and valuable pastime.
08 April 2021
Augmented Reality for Business. FieldXR Project part 3
In the previous articles, the JET BI project, Structure Sensor SDK, and the problem of identifying the scanned object were described. Also, we considered the calculating algorithm of the found 3D model position for displaying in the scanned object coordinates. Today we perform the process of developing the JET BI FieldXR project.
29 March 2021
How to work with the identified 3D objects. FieldXR project part 2
This post is the second article in the series that covers FieldXR app, an extension for Salesforce Field Service with deep visualization functionality.  We have already raised the issue of collecting 3D information about the real world required for the app’s correct operation. In this article, we will highlight the next two pain points: identifying the scanned object and calculating the position of the found 3D model for displaying in the scanned object’s coordinates.
25 March 2021