The Lord was with Jehoshaphat because he followed the earlier ways of his father by not seeking Baal.