Restricting custom generic inquiry data on the customer portal

This page is for MYOB Acumatica consultants

Check all changes in a test environment before taking them live. Make sure all related features still work as expected and that your data is unaffected.

During implementation, you might encounter a requirement where you need to build a custom generic inquiry to show data on the customer portal for portal users. However, careful considerations should be taken to ensure data of one customer is not exposed to other customers, as the customer portal is a multi-user environment. Row-level restriction is not available through the customer portal, however, there is a way to build the GI so that the portal user can only see data that is relevant to them or their business account. This knowledge base article will show you how to do that.

Build 2021.117.400.6951 [21.117.0037] onward.

  1. For simplicity, we will use this generic inquiry as an example. You can upload the GI directly on the Customer Portal using a user with the Portal Admin role. CustomerInvoices.xml
  2. For the generic inquiry to display only data that is relevant to the portal user, you need to join the CRContact table into the generic inquiry:
  3. Then, you need to add a condition where Contact.UserID = @me. This will force the GI to show only data that belongs to the portal user that is viewing it
  4. When the portal user views the inquiry, they can only see records that are relevant to them: