Mishkat al-Masabih 1568
وَعَنْ مُحَمَّدِ بْنِ خَالِدٍ السُّلَمِيِّ عَنْ أَبِيهِ عَنْ جَدِّهِ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «إِنَّ الْعَبْدَ إِذَا سَبَقَتْ لَهُ مِنَ اللَّهِ مَنْزِلَةٌ لَمْ يَبْلُغْهَا بِعَمَلِهِ ابتلاه الله فِي جسده أَفِي مَالِهِ أَوْ فِي وَلَدِهِ ثُمَّ صَبَّرَهُ عَلَى ذَلِكَ يُبَلِّغُهُ الْمَنْزِلَةَ الَّتِي سَبَقَتْ لَهُ مِنَ الله» . رَوَاهُ أَحْمد وَأَبُو دَاوُد
From Muhammad ibn Khalid as-Sulami, from his father, from his grandfather, who said: The Messenger of Allah ﷺ said: "When a rank has been decreed beforehand for a servant by Allah which he does not reach by his deeds, Allah tries him in his body, or in his wealth, or in his children; then He makes him patient through that, until He brings him to the rank that was decreed for him beforehand by Allah." Reported by Ahmad and Abu Dawud.