SAP Knowledge Base Article - Public

3652489 - How to remove shared favorites from CPQ tenant?

Symptom

  • A user has mistakenly marked multiple favorites in the product catalog as shared favorites, making them visible to all users within the tenant.
  • These shared favorites are now appearing for other users.
  • However, the admin is unable to identify the user who created them from the audit trail and cannot find an option to delete them. 

Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.

Environment

SAP CPQ

Cause

The inability to delete shared favorites is due to system restrictions where only the user who created the favorites can delete them.

Resolution

It is possible to identify the user who created specific favorites using scripting. The Script Workbench can be used to find the user who created a favorite by using its FavoriteId.

To find the favorite IDs, follow these below steps:

  1. Login to the tenant and open browser console by pressing Fn+F12.
  2. Click on the Network tab in the console.
  3. Now click on the Favorites option and some entries will be visible under the Network tab in the browser console.
  4. Scroll down and look for GetInitData? entry as highlighted in the screenshot, and click on it.




5. Click on the Response payload and press Ctrl+F to look for "FavoriteId", or else copy-paste this response to a notepad and search for all the FavoriteIds.



Once the favorite IDs to be deleted have been identified, execute the following line in the Script Workbench:

 x = SqlHelper.GetList(''' select CreatedByUserId from FavoritesDefinition where id = xyz ''')

Here instead of xyz, put in the favorite ID.

  1. Once the user’s information is available, contact the user and request that the global favorites be deleted.
  2. If the user is no longer working in the company, then:
  • Provide the list of favorite IDs to the support team for deletion via a database update, and provide this KBA as a reference.
  • Alternatively, delete the user account to check if the associated global favorites are also removed.

Note: To prevent this issue from occurring in the future, it is recommended to update the Set Favorites Permissions setting to restrict this action to admins only. 

    See Also

    Refer to: Favorites Management

    Keywords

    global favorites, shared favorites, sales cloud cpq, delete favorites, admin permissions, script workbench, audit trail, product catalog, database update, favorite IDs, user-created favorites , KBA , CEC-SAL-CPQ , Sales Cloud CPQ , Problem

    Product

    SAP CPQ all versions