When the Messenger of Allah ﷺ was approaching death, there were men in the house, among them Umar bin Khattab. The Prophet ﷺ said, "Come, let me write for you a document after which you will never go astray."Umar said, "The Prophet ﷺ is overcome by pain, and you have the Quran. The Book of Allah is sufficient for us."The people in the house disagreed and disputed. Some of them said, "Bring writing materials so the Prophet ﷺ may write for you a document after which you will never go astray." Others said what Umar had said. When their idle talk and disagreement grew loud in the presence of the Prophet ﷺ, the Messenger of Allah ﷺ said, "Get up." In another narration, "Leave me, for it is not fitting that there be quarreling in my presence."Ubayd Allah said that Ibn Abbas used to say, "The calamity, the great calamity, was what came between the Messenger of Allah ﷺ and his writing that document for them, namely their disagreement and clamor."
لما حضر رسول الله ﷺ وفي البيت رجال، فيهم عمر بن الخطاب قال النبي ﷺ: هلم اكتب لكم كتابا لا تضلوا بعده فقال عمر: إن النبي ﷺ و قد غلب عليه الوجع وعندكم القرآن، حسبنا كتاب الله فاختلف أهل البيت فاختصموا منهم من يقول: قربوا يكتب لكم النبي ﷺ كتابا لن تضلوا بعده، ومنهم من يقول ما قال عمر. فلما أكثروا اللغو والاختلاف عند النبي ﷺ قال رسول الله ﷺ: قوموا. وفي رواية: قوموا عني ولا ينبغي عندي التنازع، قال عبيد الله: فكان ابن عباس يقول: إن الرزية كل الرزية ما حال بين رسول الله ﷺ وبين أن يكتب لهم ذلك الكتاب من اختلافهم ولغطهم.
Bukhari reported it in the Book of the Sick (5669), and Muslim in the Book of Bequests (22/1637), both from the hadith of Abdul-Razzaq, from Maamar, from Zuhri, from Ubaydullah bin Utbah, from Ibn Abbas, who mentioned it.