Create “Favorites” Section in Knowledge Home Page

Arun Kailash
Tera Contributor

ArunKailash_0-1779359079133.png

ArunKailash_1-1779359632411.png

ArunKailash_2-1779359653359.png

 

Hi ,

I am working on a requirement in the Service Operations Workspace (SOW) Knowledge Article page.

Requirement

When a user clicks the “Test” button, the selected Knowledge Article should be added to a custom favorites table. The record should store:

  • User

  • Knowledge Article

I have already:

  • Created the required custom table

  • Configured the Data Resource in UI Builder

  • Added a Client Script for the button action

Currently, the functionality is working correctly, and the article is being added to the custom favorites table successfully.

Issue

I am trying to add validation so that:

  • A user can favorite a particular article only once

  • If the same user tries to favorite the same article again, it should not create a duplicate record

  • Instead, it should display a notification message such as:

    “This article has already been added to your favorites.”

I attempted to perform a duplicate check using a Lookup Records data resource before creating the record, but the validation is not behaving as expected in UI Builder / SOW Workspace.

Question

What is the recommended approach in UI Builder / Now Experience to:

  1. Check whether the favorite record already exists for the current user and article

  2. Prevent duplicate inserts

  3. Show a warning notification if the article is already favorited

Any guidance or best practices would be greatly appreciated.

Thanks in advance!

 

0 REPLIES 0