Looking for PowerObjects? Don’t worry, you’re in the right place! We’ve been part of HCL for several years, and we’ve now taken the final step in our acquisition journey: moving our website to the HCL domain. Nothing else is changing – we are still fanatically focused on Microsoft Business Applications!

PowerObjects Blog 

for Microsoft Business Applications

|

How to Limit Portal Comments to the Logged-in User

Post Author: Alvaro Pino Freire |

We were recently working with a customer on portals, and we had the requirement to show in the portal only comments directed to the logged-in portal user. You might think easy-peasywe just need to limit relevant Table Permissions to contact scope! You’d be wrong, as it turns out.

If you set up the ‘Activity pointer’ and ‘Portal Comment’ Tables to Contact scope, what you get is the button to add the portal comments, but nothing will show on the subgrid. Even an added portal comment won’t appear on the subgrid below.

Background pattern

Description automatically generated with low confidence

Figure 1. When ‘Activity pointer’ and ‘Portal Comment’ Tables to Contact scope, they will not show any record.

So, we went scratched our heads and went back to the drawing board. Here’s how we ultimately achieved this requirement:

Step 1. Set the ‘Portal Comment’ and ‘Activity pointer’ Table permissions to Parent scope to the related record (in this example Case was used), as shown below:

A screenshot of a computer

Description automatically generated with medium confidence

Figure 2. Parent Table permissions added to Case an’ Activity Pointer’ and ‘Portal Comment’ Tables.

That will show any ‘Portal Comment’ that has been added to the case, even if was made by or to another user not logged-in to the portal.

In this example a ‘Portal Comment’ was made to another user (A Datum Fabrication). This portal should not be visible if we want to have only the ones made by or to the Contact logged in.

Graphical user interface, text, application, email

Description automatically generated

Figure 3. Portal Comments with Table Permissions set to Parent scope.

Step 2. Create a Dummy Contact record that will become a configuration record on your views. So, make sure that you add that to your Configuration data across your environments.

Nothing needs to be added to this dummy contact. Here, only First and Last Name have been added:

Graphical user interface, application

Description automatically generated

Figure 4. Create a dummy contact.

Step 3. Set up the Portal Timeline view on the Activity Table to be the filter when Contact is your dummy contact.

Graphical user interface, application

Description automatically generated

Figure 5. Select the Portal Timeline View.

­­ Graphical user interface, application

Description automatically generated

Figure 6. Add a Related table filter on Activity Party where Party is your dummy contact.

Navigate back to the Portal and all the magic is done. Now you have only the ‘Portal Comments’ for the portal that is logged in.

Graphical user interface, text, application, email

Description automatically generated

Figure 7. Now only Portal Comments made by or to the logged user will show on the Timeline.

The drawback is that you will limit all Portal activities to only the related logged-in user, but nothing is stopping you from using a subgrid on the form and configuring a view with identical filters rather than the Portal Timeline. Happy Portaling!

Joe CRM
By Joe D365
Joe D365 is a Microsoft Dynamics 365 superhero who runs on pure Dynamics adrenaline. As the face of PowerObjects, Joe D365’s mission is to reveal innovative ways to use Dynamics 365 and bring the application to more businesses and organizations around the world.

Leave a Reply

Your email address will not be published.

PowerObjects Recommends