2 Chronicles 7:19
But if ye turn away, and forsake my statutes and my commandments, which I have set before you, and shall go and serve other gods, and worship them; But if ye turn away, and forsake my statutes and my commandments, which I have set before you, and shall go and serve other gods, and worship them;
God's answer came after the temple was finished and dedicated with great splendor over seven days. Solomon had told the people that God was not confined to temples like heathen gods but would meet them by His Spirit when they assembled in the dedicated house, had knelt and prayed for God's eyes to be open toward the house night and day, and then fire came down from heaven and consumed the burnt offering and sacrifices and the glory of the Lord filled the house so the priests could not enter and the people bowed and worshiped. The turning point stated is this: if Solomon and Israel, or their children and descendants, turn away from following God, forsake His statutes and commandments set before them, and go and serve and worship other gods.
God's favor and the covenant blessings and promises to Solomon and Israel are conditional on continued loyalty, faithful obedience, and keeping His commandments. Walking before God as David walked in integrity and uprightness and keeping His statutes and judgments would establish the throne of the kingdom upon Israel forever. If Solomon remained faithful and the people obeyed, the glorious temple would stand forever in splendor as evidence of the prosperity and exalted blessings resting on Israel, whose obedience set them apart as a people preserving true worship. If they apostatized, the blessings would not stand but would be withdrawn. God would cut Israel off and remove them out of the land He gave them, cast the house hallowed and sanctified for His name out of His sight and reject it, bring calamity upon the temple so it would not remain secure, and make Israel and the temple a proverb and a byword and a reproach among all people and nations.
The warning was fulfilled some hundreds of years after the temple was built because of Solomon's apostasy and Israel's transgression, wicked acts, and idolatry. Israel had made the temple their pride and regarded it with idolatry while sinning against God, so captivity came to humble and punish them and the temple was destroyed, becoming a proverb and byword among the nations instead of remaining a lasting sign of God's favor. Because of the people's sins, God revealed the coming fate of the temple and the captivity to a few faithful servants before its destruction. With mourning they removed the sacred ark containing the tables of stone and secreted it in a cave to hide it from Israel, and it was not restored to them.
The ark hidden because of Israel's sins was to be no more restored to them and remains hid undisturbed to this day. The verse is a warning to heed God's words, since turning away brings the stated consequences.