Narrated `Ali:
While the Prophet (ﷺ) was in a funeral procession, he took a small stick and started scraping the earth with it and said, "There is none among you but has his place written for him, either in the Hell Fire or in Paradise." They (the people) said, "Allah's Messenger (ﷺ)! Shall we depend on this (and leave work)?" He replied. "Carry on doing (good deeds), for everybody will find easy (to do) such deeds as will lead him to his destined place." The Prophet (ﷺ) then recited:-- 'As for him who gives (in charity) and keeps his duty to Allah, and believes in the Best Reward.'.....(92.5-10)
USC-MSA web (English) reference: Vol. 6, Book 60, Hadith 471
Arabic reference: Book 65, Hadith 4946