'Incorrect recipient while sending a custom notification /email to record owner in Salesforce

We have configured the custom notification(bell on top right corner of user screen) to record owner based based on some criteria in apex class and where this class is called in process builder.Now issue is Custom notification(bell) is sending to record owner as well as the other user which is picking randomly which is not expected.Any idea with issue?We have seen that technically everything looks fine.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source