If the court orders the sealing of the records and files pursuant to § 26-7A-113, 26-7A-114, or 26-7A-115, copies of the sealing order shall be sent to each agency or official named in the order. Subsequent inspection of the sealed records may thereafter be permitted by the court only on petition by the child who is the subject of the record, the state's attorney, or court services officers. The court may permit inspection of the sealed records and files for use by the court in other actions or proceedings under this chapter or chapter 26-8C and for subsequent criminal proceedings for sentencing purposes. Nothing in this chapter prohibits the custodian of records or files from inspecting or accessing the custodian's records or files as may be necessary for the discharge of the custodian's official duties in the absence of an order from the court.
SDCL 26-7A-116