Tip #300: Adding a specific activity type subgrid

Occasionally I get a design requirement to have a subgrid on a form that only includes a certain type of activity. For example, a grid of scheduled appointments on the account form.

This sounds simple, but due to the mysteries of the activity pointer, it is not so straightforward.

If you add a subgrid and select one of the activity entities, such as appointments or tasks, the subgrid will display correctly; however, when a user adds a new record by hitting the “new” button, the regarding field on the created record will not be set.

Alternatives

Instead of creating a subgrid that is pointed to the specific activity entity, make a grid of activity pointer records and set the view for the subgrid to a view filtered to the desired activity type. Records created from this grid will have regarding object set. The downside is that when a user clicks the “new” button, the user will have to choose the type of activity to create. If they select an activity type outside of the subgrid filter, the created activity will not appear in the subgrid after it is created.

Another option is expose the create button for the desired activity type on the command bar using the ribbon workbench. Way back in 2011, the ribbon contained create buttons for each type of activity. These still exist in 2015, but they are hidden by default. Unhide the button and teach users to create records from the command bar.

Tweet about this on TwitterShare on Facebook0Share on Google+0

Leave a Reply

Your email address will not be published. Required fields are marked *