Alqamah narrates that (for the funeral) the Messenger of Allah, peace and blessings be upon him, stood up and instructed us to stand as well, then he sat down and instructed us to sit as well.
Hadith Referenceمسند الإمام الشافعي / كتاب الجنائز / 583
Hadith Takhrijاسناده ضعيف لضعف شیخ الشافعي : اخرجه البيهقي في المعرفة السنن والآثار (2128) ۔ واحمد: 1/ 82 ۔ وابو یعلی (273)۔