Does seeking an answer to a supplication by virtue of one’s righteous deed (tawassul) to achieve some worldly goal detract from the reward of that deed?
Question

It is narrated that offering supplication and seeking to draw closer to Allah (tawassul) by virtue of a sincere righteous deed is one of the means of having one’s supplication answered. My question is: if someone offers supplication to his Lord by virtue of a righteous deed he did, will he get his reward for that deed in full in this world, and not be rewarded for it on the Day of Resurrection? Similarly, is it possible to offer supplication by virtue of the same deed more than once?
Praise be to Allah.Firstly:
Seeking to draw close to Allah by virtue of righteous deeds (tawassul) is encouraged (mustahabb), and it is a means of increasing the potential of supplication being answered, as we see in the story of the companions of the cave.
Shaykh al-Islam Ibn Taymiyah (may Allah have mercy on him) said: With regard to seeking to draw close to Allah, turning to Him and asking of Him by virtue of righteous deeds that He has enjoined – such as the supplication of the three who entered the cave, asking Allah, by virtue of their righteous deeds, [to remove the rock that had fallen across the mouth of the cave]; and by asking the prophets and the righteous [during their lifetimes] to offer supplication for one and to intercede – this is something that no one disputes. Rather this is the means (waseelah) that Allah enjoined in the verses (interpretation of the meaning):
{O you who have believed, fear Allah and seek the means [of nearness] to Him} [al-Maa’idah 5:35]
{Those whom they invoke seek means of access to their Lord, [striving as to] which of them would be nearest, and they hope for His mercy and fear His punishment} [al-Isra’ 17:57].
What is meant by seeking means of nearness or access to Him is: seeking that which will bring you closer to Him, whether it is in the form of worship, obedience and compliance with His commands, or in the form of asking of Him and seeking refuge with Him in hope of attaining benefits and warding off harm.
End quote from Iqtida’ as-Siraat al-Mustaqeem (2/312).
Secondly:
Seeking to draw close to Allah (tawassul) by means of righteous deeds does not detract from the reward of those deeds, whether the individual is seeking an answer to supplication by virtue of some righteous deed that he did in order to achieve some worldly goal or some goal in the hereafter, because it is a righteous deed that was done for the purpose of drawing closer to Allah, and it was not intended – initially – for any worldly purpose.
Shaykh ‘Abd ar-Rahmaan al-Barraak (may Allah preserve him) was asked: Does seeking to draw close to Allah (tawassul) by virtue of righteous deeds detract from the reward of those deeds in the hereafter?
He replied: Seeking to draw close to Allah by virtue of righteous deeds, when offering supplication, does not detract from their reward in the hereafter, for Allah has made righteous deeds a means of attaining happiness in this world and the hereafter. He, may He be exalted, says (interpretation of the meaning):
{And whoever fears Allah - He will make for him of his matter ease} [at-Talaaq 65:4]
{and whoever fears Allah - He will remove for him his misdeeds and make great for him his reward} [at-Talaaq 65:5]
{And whoever fears Allah - He will make for him a way out, 
And will provide for him from where he does not expect} [al-Talaaq 2-3].
One of the most concise of supplications is: “Rabbanaa aatina fi’d-dunya hasanah wa fi’l-aakhirati hasanah wa qina ‘adhaab an-naar (Our Lord, give us in this world [that which is] good and in the Hereafter [that which is] good and protect us from the punishment of the Fire).” And Allah, may He be glorified and exalted, says of His Close Friend (Khaleel) Ibraaheem (interpretation of the meaning): {And We gave him his reward in this world, and indeed, he is in the Hereafter among the righteous} [al-‘Ankaboot 29:27].
But the Muslim should strive to do righteous deeds seeking the reward of the hereafter, for that is the greatest objective, whilst also hoping for what Allah has promised to those who strive to do righteous deeds of ease in their affairs and abundant provision.
It is not permissible for a person’s focus and aim in doing righteous deeds to be in pursuit of worldly benefits only, without paying attention to reward in the hereafter, for Allah criticised those who say “Our Lord, give us in this world”, as He, may He be exalted, says (interpretation of the meaning):
{And among the people is he who says, “Our Lord, give us in this world,” and he will have in the Hereafter no share} [al-Baqarah 2:200]
{Whoever should desire the immediate - We hasten for him from it what We will to whom We intend. Then We have made for him Hell, which he will [enter to] burn, censured and banished. 
But whoever desires the Hereafter and exerts the effort due to it while he is a believer - it is those whose effort is ever appreciated [by Allah]} [al-Isra’ 17:18-19].
Allah, may He be exalted, states that He wants them to seek the hereafter, as He, may He be exalted, says (interpretation of the meaning)
{Some Muslims desire the commodities of this world, but Allah desires [for you] the Hereafter} [al-Anfaal 8:67]
{Whoever desires the reward of this world - then with Allah is the reward of this world and the Hereafter. And ever is Allah Hearing and Seeing} [an-Nisa’ 4:134].
And Allah knows best.
End quote from Fataawa al-Islam al-Yawm: https://goo.gl/QV29ci
Regarding the one who does righteous deeds initially seeking some worldly benefit thereby, or intending to come back and seek to draw close to Allah and offer supplication to Him by virtue of them in order to attain some wealthy goal, what appears to be the case is that this will detract from his reward, commensurate with the extent to which his aim is this world and not the hereafter.
This has been discussed previously in the answer to question no. 228454 .
Thirdly:
There is nothing wrong with seeking to draw close to Allah, may He be exalted, and ask of Him by virtue of the same righteous deed more than once, for this is a kind of supplication that is prescribed, and it is seeking to draw close to Allah and complying with His command (interpretation of the meaning):
{O you who have believed, fear Allah and seek the means [of nearness] to Him and strive in His cause that you may succeed} [al-Maa’idah 5:35].
We ask Allah, may He be exalted, to accept righteous deeds from us and from you.
And Allah knows best.