When attempting to select a specific list view from the Field Service-related object tabs (e.g., Service Territory), users may encounter the following error:
Failed to get metadata of listview All ServiceTerritories for entity ServiceTerritory. org.postgresql.util.PSQLException: ERROR: query returned more than one row Where: PL/sdb function grumpy.cfilter.get_filter_id_by_type_dev_name(character varying,character varying,character varying) line 5 (SFSQL 1005) at SQL statement PL/sdb function grumpy.cfilter.get.filter_by_type_dev_name(character varying.character varying.character varying,character varying,character varying) line 5 (SFSQL 1044) at assignment |
To resolve errors encountered when selecting certain list views in Field Service related objects, follow these steps to identify and fix duplicate list views:
Navigate to the Service Territories tab (or any other Field Service related object tab).
Select the List View dropdown to review all available list views.
Look for any list views that have the same name or developer name.
If duplicates are identified, rename or delete them to avoid conflicts.
Run the following queries in the Developer Console or Workbench to list all list views for the relevant objects:
Service Appointment List Views:
SELECT Id, DeveloperName, Name, SobjectType, CreatedById, CreatedDate FROM ListView WHERE SobjectType = 'ServiceAppointment'
Work Order List Views:
SELECT Id, DeveloperName, Name, SobjectType, CreatedById, CreatedDate FROM ListView WHERE SobjectType = 'WorkOrder'
Service Territory List Views:
SELECT Id, DeveloperName, Name, SobjectType, CreatedById, CreatedDate FROM ListView WHERE SobjectType = 'ServiceTerritory'
Review the results for duplicate Name or DeveloperName values. Rename or delete any duplicates to resolve the error.
005226783

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.