Sunan an-Nasa'i #3651 · The Book of Wills

Sunan an-Nasa'iIt was narrated from Abu Hurairah that the Messenger of Allah said
Sunan an-Nasa'i · Book 30 · The Book of Wills
Sunan an-Nasa'i · كتاب 30 · كتاب الوصايا
"When a man dies all his good deeds come to an end except three: Ongoing charity (Sadaqah Jariyah), beneficial knowledge and a righteous son who prays for him
أَخْبَرَنَا عَلِيُّ بْنُ حُجْرٍ، قَالَ حَدَّثَنَا إِسْمَاعِيلُ، قَالَ حَدَّثَنَا الْعَلاَءُ، عَنْ أَبِيهِ، عَنْ أَبِي هُرَيْرَةَ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ ‏
"‏ إِذَا مَاتَ الإِنْسَانُ انْقَطَعَ عَمَلُهُ إِلاَّ مِنْ ثَلاَثَةٍ مِنْ صَدَقَةٍ جَارِيَةٍ وَعِلْمٍ يُنْتَفَعُ بِهِ وَوَلَدٍ صَالِحٍ يَدْعُو لَهُ ‏"‏‏.‏
Reference : Sunan an-Nasa'i 3651In-book reference : Book 30, Hadith 41