David wanted to build a temple for God but was told his son Solomon would build it instead. God put the temple plans in Solomon's mind. David gathered materials for the temple and the people gave generously. Solomon built the temple according to God's instructions. When complete, sacrifices were made and the people celebrated with great joy in God's presence.