It is narrated from Sayyiduna Umar bin al-Khattab (may Allah be pleased with him) that he said: "O Messenger of Allah (peace and blessings be upon him), what do you say: are the deeds we do a matter newly begun, or a matter that has already been settled (in the divine decree)?" He (peace and blessings be upon him) said: "It is a matter that has already been settled. So keep doing deeds, O Ibn al-Khattab, for everyone is made easy (for the path for which he was created). Whoever is among the people of happiness will do the deeds of happiness, and whoever is among the people of wretchedness will do the deeds of wretchedness."
Imam Musaddad (may Allah have mercy on him) also narrated it, in which Sa'id bin al-Musayyib (may Allah have mercy on him) reports from Sayyiduna Umar (may Allah be pleased with him) a narration with the same meaning up to "has already been settled", but with this addition: Sayyiduna Umar (may Allah be pleased with him) said: "Then what are deeds for?" He (peace and blessings be upon him) said: "(The goal) is not attained except through deeds." At this Sayyiduna Umar (may Allah be pleased with him) said: "Then we will strive hard (in good deeds)."