We have an in-house system which tracks stock and currently sends journals to our legacy financial system using an XML based web interface. It also requests the posting of the journals automatically, so once a journal is sent, it's posted immediately.
I am currently implementing a proof-of-concept app to send journals into D365 from our database. I've been successful using OData to do this (although we may switch to DIXF in future), however, the entered journals are, obviously not posted automatically.
Is there a way to request automatic posting of a journal via an API, either OData or SOAP?
I can't see any method in the default OData metadata and there are no obvious services in the AOT which may be invoked. I tried the simplistic approach of setting the IsPosted field in LedgerJournalHeader, but, unsurprisingly, this isn't allowed.
Obviously, one solution would be a scheduled batch job to sweep up any unposted journals that have been uploaded from the stock system and then post them automatically, but our users are used to journals being posted within seconds of completing actions in the in-house app rather than waiting for a batch cycle (even if it is only a few minutes delay).
Another solution, presumably, would be to write a custom OData method or service to post journals, but we wish to avoid reinventing the wheel; this seems to be something that many people would require so is probably already available and we just haven't found it yet.