/pcfActivityGrid

A custom component that allows you to see activities for custom and native related entities. Mimics Rollup Relationship behavior.

Primary LanguageCSSApache License 2.0Apache-2.0

PCFGridActivity

A custom component that allows you to see activities for custom and native related entities. Simulates the behavior of a Rollup Relationship. Suppose we have an entity of orders. This entity has a number of activities (Order Task 1, Order Task 2, Order Email 1 etc.). In addition to activities, a child entity of Items is connected to the Order entity. Each of the Items also have their own activities (Item 1 Task 1, Item 2 Task 1 etc.). The customer set a task: I want to see all the activities at the Order level. In other words, in the Order form, I want to see both the activities of the order itself and its items.

image

Of course, we can cook up an SSRS report, but we're not looking for easy ways, are we? :)

In this case - our own control, which allows us to display all the necessary activities from any related entities.

image

image

There is an awesome components involved in this control - datatables.css and datatables.js (https://datatables.net/). It is allows you to pre-configure sorting and search. Result: image

And this one (with search): image

Unfortunately, this PCF has cons (known issues) and TODO-tasks. Firstly, native export in Excel allows you to download only those records that belong to the parent, because it operates with context.parameters.dataSet. Secondly, I would like to add universality to the code. In the createTableBody method, data is being built and I want the control to understand itself where which column is, where is what data type and automatically build the table, not via:

statuscode.innerText = results[i]["statecode@OData.Community.Display.V1.FormattedValue"];

Third, of course, we need to work with the styles. So that this table looks like the native one.

Despite the fact that the task was real, the component itself was made for educational purposes. If you decide to use this component, please use it at your own risk!

Your ideas and wishes will be warmly welcomed!