The full account of this lifetime is told in the Maha-Ummagga Jataka (#546), while the Sabbasamharaka-Panha Jataka only relates this single incident from that story.
The Bodhisatta was once a king’s advisor. As a seven-year-old boy, he was already incomparably smart, and King Vedeha had one of his advisors observe him while deciding whether he was the wise man whose coming had been predicted in a dream. During this time, the Bodhisatta performed many remarkable deeds, including judging what was called the All-embracing Question.
A poor, elderly woman made a necklace by tying together colorful threads. When she went to bathe, she laid the necklace atop her clothes. A young woman admired it and asked to try it on so she could check the size for making one of her own. The old woman said yes, and the young woman put it on and ran off. The old woman quickly got dressed and chased the thief down. A crowd gathered, and both women claimed the necklace was hers. The Bodhisatta asked each woman what fragrance they used on the necklace. The young woman said it was a fancy blended perfume, while the elderly lady answered that she could only afford panic seed flowers. The Bodhisatta put the necklace in a bowl of water and asked a perfume seller to smell it. He identified it as panic seed flower, and the exposed thief confessed.
In the Lifetime of the Buddha
One day some of the Buddha’s disciples were discussing his supreme wisdom; in particular, how he had humbled and converted a vast multitude of brahmins, ascetics, thieves, goblins, gods, and more. When the Buddha heard them talking about it, he told them this story so they knew that he’d also had perfect knowledge in the past.
King Vedeha was an earlier birth of Laludayi, an elder disciple of the Buddha who was so shy that he could not speak when around more than a single other person, and he often said one thing when he meant another.