Isn't it the same scenario as in your other threads, such as Entity export through X++? If so, let's delete this duplicate, or update your other threads and make clear that this particular question should be discussed in this thread instead.
If you mean some other scenario, please improve the description.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.