In Adventist theology, one is justified (declared righteous) at the point of making a profession of faith and being baptized. But in order to maintain that justification, one must demonstrate perfect obedience to the Law. Along the way of being sanctified, every sin must be confessed in order to be forgiven or the gates of Heaven will be closed from you. This is because your life record will be examined in the Investigative Judgment as Jesus is going over all of your sins (even sins you would have committed but didn’t) to blot out the ones that are confessed. Any unconfessed or forgotten sins will stand against you and you won’t make it through the Judgment and your name will be blotted out of the Book of Life.
The Bible teaches that man is justified apart from any works of the Law (Romans 3:28, Galatians 3:11) and it’s at the point that God grants that a person believe (Philippians 1:29) that they are seen as righteous (Romans 4:1-5). God then begins the work of sanctification within a person (Philippians 1:6) which he will not fail to finish as the Author and Finisher of our faith (Hebrews 12:1-2). Jesus knows those who are His (2 Timothy 2:19) and promises to never lose any of them (John 10:14-15). Believers do not maintain their righteous standing before God based on their obedience. Obedience is the product of God beginning a work within an individual and is the fruit of having already been justified (declared righteous before God). It does not maintain one’s justification. That is a works based salvation with the focus being inward, not outward on Jesus.