Amr bin Shu'ayb narrates from his father, from his grandfather (may Allah be pleased with him), that the Prophet (peace and blessings be upon him) said: "When one of you acquires a wife, a servant or an animal, let him take hold of its forelock, mention the name of Allah and say: 'Allahumma inni as'aluka khayraha wa khayra ma jabaltaha 'alayh, wa a'udhu bika min sharriha wa sharri ma jabaltaha 'alayh' (O Allah, I ask You for its good and the good of what has been created in its nature, and O Allah, I seek refuge with You from its evil and from the evil that has been placed in its nature)."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب النكاح / 13838
Ibn Ajlan (may Allah have mercy on him) also mentioned similar to it: that he should take hold of its forelock, pray for blessing and say.
(b) He mentioned it and added: If it is a camel, he should take hold of its hump and say.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب النكاح / 13839