Sahih Bukhari – Hadith No : 6288

Narrated `Ali: We were with the Prophet in a funeral procession, and he started scraping the ground with a small stick and said, “There is none amongst you but has been assigned a place (either) in Paradise and (or) in the Hell-Fire.” The people said (to him), “Should we not depend upon it?” He said: carry on doing (good) deeds, for everybody will find easy such deeds as will lead him to his destined place. He then recited: “As for him who gives (in charity) and keeps his duty to Allah..” (92.5)

Hadith In Arabic Text :

حدثنا محمد بن بشار، حدثنا ابن أبي عدي، عن شعبة، عن سليمان، ومنصور، عن سعد بن عبيدة، عن أبي عبد الرحمن السلمي، عن علي رضى الله عنه قال كنا مع النبي صلى الله عليه وسلم في جنازة فجعل ينكت الأرض بعود، فقال ‏”‏ ليس منكم من أحد إلا وقد فرغ من مقعده من الجنة والنار ‏”‏‏.‏ فقالوا أفلا نتكل قال ‏”‏ اعملوا فكل ميسر ‏”‏‏.‏ ‏{‏فأما من أعطى واتقى‏}‏ الآية‏.‏

Chapter : Good Manners and Form (Al-Adab) – كتاب الأدب