Control Flow of Strapi Admin Panel

I tried this approach when it comes to populate the document in the collection it is giving me the error MissingErrorSchema. So i attached the schema of the collection from api/orders/models/orders.settings.json to get rid of this error. When i am using with node and mongoDB, it is working perfectly fine. Can you please, help me in this?