Anyone can suggest how to call Trail Balance report using Rest API and output should be return in json format?
Thanks in advance.
Anyone can suggest how to call Trail Balance report using Rest API and output should be return in json format?
Thanks in advance.
I haven’t done this myself, but a quick search in the REST API helper/swagger page shows this: Erp.RPT.trialbalanceSvc
If I were you, I would try and see if I can use a BAQ to get the data for this. Getting results from BAQ results to JSON/XML is a lot easier.
Do you have Trail Balance Baq?
I’m afraid not. But you can find something similar here: Using REST api to get a GL balance. Failing with unusual message
You can certainly generate the report from REST but unless SSRS added Json to the export list, you won’t be able to do it directly. Like @NateS said, you will execute the Erp.RPT.TrialBalanceSvc.RunDirect method.
Your best bet is to export as XML and then convert to Json. Both the REST call and Json conversion can be done in PowerShell.
Separately - always a good read: