Hi PIL,
I am not a developer who can help you much with that.
Yet, please try to search for similar Posts and Blogs on this community site as similar questions have already been asked in the past.
What I found by doing a quick search is the following post
community.dynamics.com/.../job-upload-general-journal-example-code-2
Probably check if this code example helps and if it does not, search for other contributions.
Best regards,
Ludwig