It was narrated from Sulaiman bin Buraidah that his father said:
“The Messenger of Allah (ﷺ) used to teach them, when they went out to the graveyard, to say: As-salamu ‘alaykum ahlad-diyar minal-mu’minina wal- muslimin, wa inna insha’ Allah bikum lahiqun, nas’alul-laha lana wa lakumul-‘afiyah (Peace be upon you, O inhabitants of the abodes, believers and Muslims, and we will join you soon if Allah wills. We ask Allah for well-being for us and for you).’”