How to get current page's resourceId or contextId?

I tested your queryCommentsForPage() method and it works as expected.

I believe the error occurs when the item id is passed from the dataset (currentItem) into the method.

 const currentItem = $w('#dynamicDataset').getCurrentItem();
 console.log("Dataset current item:", currentItem);

At the moment it seems to be passing the item ids from the data passed to the dataset.

Verify that the resourceId you see in queryAllComments() for the associated item’s comment thread matches what is being passed into the queryCommentsForPage() method.

1 Like