Once a king named Shalva besieged the city of Dwarka and it was Udhava, who saved the city. When Sri Krishna was brought by Akrura to Matbura, he killed Kansa and made Ugrasena the king. At that time Sri Krishna sent Udhava to Ambadi to know about the well-being of people there. The gopas and gopa women (cowherds) all met him eagerly to know about Sri Krishna. They were pleased to know about his welfare.
It was Udhava who was informed by Sri Krishna beforehand that the Yadava dynasty was going to end.Udhava wanted Sri Krishna to take him along with him to Vaikuntha. At that time Sri Krishna taught Udhava the doctrine that the human body and other material things of the universe were mere delusion. Sri Krishna also answered several questions about bondage and liberation. Udhava then left Dwarka, having come to know about the imminent destruction from Sri Krishna, for which he was permitted by Sri Krishna. Comments : It is said that Udhava, after leaving Dwaraka, went to the hermitage of Badarika and engaged himself in penance and devotion and ultimately attained deliverance
1. Kohli,Surindar Singh ed,Dictionary of Mythological References in Guru Granth Sahib 1993