Hello good day.
I have a problem when registering several lines to a central Business entity (General Ledger)
this is the body of the json object
but when I register only 1 line if it works well, the problem is when registering several lines, I am creating the service in this way.
or how could I do to be able to register more than 1 line (5000 lines) in a single call
I added some code to git hub:
https://github.com/ingebruvik/JsonToGLJournal
This adds an action to your G/L Journal page and you can upload the json file into your journal.
Then we can build from here and add the support for the Azure blog store.
You can see if you are able to access the code on github.
this is the file
[
{
"DIARIO_ORIGEN":"GENERAL",
"DIARIO_LOTE":"GL-PL",
"FECHA_CONTABILIZACION":"2022-03-04",
"FECHA_EMISION":"2022-03-04",
"Linea":1,
"CUENTA_TIPO":"G/L Account",
"CUENTA_NUMERO":"6211110",
"DESCRIPCION":"PLLA REM RESGUARDO ENE 2022",
"MONEDA_ID":"PEN",
"MONTO":0.0,
"MONTO_ORIG":0.0,
"DEBITO":28350.97,
"CREDITO":0.0,
"ESTRUCTURA_CUENTA":"A1-CCOSTO|B1-CLIENTE|B2-CORPORACION|A2-DEDUCIBLE|A3-PLACA|C2-PLANILLA|B3-TORRE|C1-TRABAJADOR||",
"ESTRUCTURA_VALOR":"RSG01.CS01|20522228347|CORP. ISEG PERU S.A.|SÍ|||GENERAL|"
},
{
"DIARIO_ORIGEN":"GENERAL",
"DIARIO_LOTE":"GL-PL",
"FECHA_CONTABILIZACION":"2022-03-04",
"FECHA_EMISION":"2022-03-04",
"Linea":2,
"CUENTA_TIPO":"G/L Account",
"CUENTA_NUMERO":"6211130",
"DESCRIPCION":"PLLA REM RESGUARDO ENE 2022",
"MONEDA_ID":"PEN",
"MONTO":0.0,
"MONTO_ORIG":0.0,
"DEBITO":15246.92,
"CREDITO":0.0,
"ESTRUCTURA_CUENTA":"A1-CCOSTO|B1-CLIENTE|B2-CORPORACION|A2-DEDUCIBLE|A3-PLACA|C2-PLANILLA|B3-TORRE|C1-TRABAJADOR||",
"ESTRUCTURA_VALOR":"RSG01.CS01|20522228347|CORP. ISEG PERU S.A.|SÍ|||GENERAL|"
}
]
Yes i could do that if you could send a sample of your json file so i don't have to create those data myself.
I can not copy it from an image :)
thank you, but could you share an example to guide me please
Ahh, sorry i did not catch that you do this in an API page.
Then you will have to send one line at the time.
If you have a large amount of lines then you should do this another way.
Either create a customized API that can take the full json load and handle it as a batch or store the json in an Azure blob storage and have BC read it from there.
When i need to handle a large batch of lines i save the Json to Azure blob storage first.
Hello, good morning, in the last image you can see that it is inside a matrix, perhaps the service that has been created in Business Central does not support when multiple lines are sent?
Are you sure your json is formatted correctly ?
Should not the lines be in an array ?
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156