The LORD was with Jehoshaphat, because he walked in the earlier ways of his father David. He did not seek the Baals, but sought the God of his father and walked in his commandments, and not according to the practices of Israel.
2 Chronicles 17:3-4
What led to the success of Jehoshaphat was his unwavering commitment to seek God and live by His commandments. This gave him the necessary personal fortitude of character to lead Judah. He kept the covenant and led the nation in the worship of Yahweh. And Judah was blessed as a result of this.
The text comments upon the obedience of the king. Jehoshaphat "walked" in the way that David did. He showed by his life that God was his God. And that visible commitment helped show the nation how to live according to the covenant. He refused to seek the idols that beset Israel. Instead, he sought after God by living by God's commands.
In Jehoshaphat I see three things that led to God's blessing on his life:
1) He walked according to his godly heritage. He honored the God that David worshiped.
2) He sought God personally. He made his relationship with God his very own.
3) He lived out his faith. He did not just pay lip-service to Yahweh. He practiced what the Law said.
These three things set Jehoshaphat apart to God and apart from idolatrous Israel to the north of Judah. These things led Judah to enjoy the blessings of the covenant. They show us how to seriously seek God.