Abu Hafsa reported,

Ubada bin Samit said to his son, "My son, you will never taste the true reality of faith until you know that what has befallen you was never going to miss you, and what has missed you was never going to befall you. I heard the Messenger of Allah ﷺ say, 'The first thing Allah created was the Pen. He said to it, "Write." It asked, "My Lord, what shall I write?" He said, "Write the measure of all things until the Hour comes."' My son, I heard the Messenger of Allah ﷺ say, 'Whoever dies upon other than this is not from me.'"

Abu Dawud 4700

Sahih

حدثنا جعفر بن مسافر الهذلي حدثنا يحيى بن حسان حدثنا الوليد بن رباح عن إبراهيم بن أبي عبلة

عن أبي حفصة قال

قال عبادة بن الصامت لابنه يا بني إنك لن تجد طعم حقيقة الإيمان حتى تعلم أن ما أصابك لم يكن ليخطئك وما أخطأك لم يكن ليصيبك سمعت رسول الله ﷺ يقول إن أول ما خلق الله القلم فقال له اكتب قال رب وماذا أكتب قال اكتب مقادير كل شيء حتى تقوم الساعة يا بني إني سمعت رسول الله ﷺ يقول من مات على غير هذا فليس مني

أبو داود 4700صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Abu Dawud
Book
Sunnah
Chapter
Decree
Numbering
Darussalam 4700
Abu Dawud 4700