Hi,
I have created a simple data entity that I am trying to add with postman, next I will crete the code to add it automatically.
What I need to do is to load data into the system through ODATA.
I've managed to retrieve the token to access it and I managed to do the GET and the POST of the data entity.
With GET I retrieve all the lines inside the data entity while with POST I manage to insert the lines one at a time (json format).
Here is the link to the data entity: myenvironment.sandbox.ax.dynamics.com/.../WorkFeedbacks
and a GET example:
{
"@odata.context": "https://autoblok365dev01devaos.sandbox.ax.dynamics.com/data/$metadata#WorkFeedbacks",
"value": [
{
"@odata.etag": "W/\"JzEsNTYzNzE0NDU3Nic=\"",
"dataAreaId": "itmp",
"IdAbs": 1,
"RigaMissione": 0,
"QtyArt": 0,
"TipoMovimento": "12",
"Profondita": "10",
"Matricola": "906569",
"OraMov": "2020-10-26T23:00:00Z",
"DescCommessa": "Purch",
"QtyMov": 0,
"DataMov": "2020-10-27T12:00:00Z",
"AddFld02": "baba2",
"Lotto": "29082019",
"Commessa": "LP00000021",
"AddFld03": "baba3",
"Operatore": "1524",
"Macchina": "",
"CodArt": "",
"Zona": "1",
"Piano": "10",
"AddFld01": "baba"
},
{
"@odata.etag": "W/\"JzEsNTYzNzE0NDU3Nyc=\"",
"dataAreaId": "itmp",
"IdAbs": 2,
"RigaMissione": 0,
"QtyArt": 0,
"TipoMovimento": "12",
"Profondita": "10",
"Matricola": "906569",
"OraMov": "2020-10-26T23:00:00Z",
"DescCommessa": "Purch",
"QtyMov": 0,
"DataMov": "2020-10-27T12:00:00Z",
"AddFld02": "baba2",
"Lotto": "29082019",
"Commessa": "LP00000021",
"AddFld03": "baba3",
"Operatore": "1524",
"Macchina": "",
"CodArt": "",
"Zona": "1",
"Piano": "10",
"AddFld01": "baba"
}
]
}
This is a post example of one line:
{
"IdAbs": 3,
"RigaMissione": 0,
"QtyArt": 0,
"TipoMovimento": "12",
"Profondita": "10",
"Matricola": "906569",
"OraMov": "2020-10-26T23:00:00Z",
"DescCommessa": "Purch",
"QtyMov": 0,
"DataMov": "2020-10-27T12:00:00Z",
"AddFld02": "baba2",
"Lotto": "29082019",
"Commessa": "LP00000021",
"AddFld03": "baba3",
"Operatore": "1524",
"Macchina": "",
"CodArt": "",
"Zona": "1",
"Piano": "10",
"AddFld01": "baba"
}
I have not been able to add more than one line in one step?
Call with two lines does not work:
[
{
"IdAbs": 3,
"RigaMissione": 0,
"QtyArt": 0,
"TipoMovimento": "12",
"Profondita": "10",
"Matricola": "906569",
"OraMov": "2020-10-26T23:00:00Z",
"DescCommessa": "Purch",
"QtyMov": 0,
"DataMov": "2020-10-27T12:00:00Z",
"AddFld02": "baba2",
"Lotto": "29082019",
"Commessa": "LP00000021",
"AddFld03": "baba3",
"Operatore": "1524",
"Macchina": "",
"CodArt": "",
"Zona": "1",
"Piano": "10",
"AddFld01": "baba"
},
{
"IdAbs": 4,
"RigaMissione": 0,
"QtyArt": 0,
"TipoMovimento": "12",
"Profondita": "10",
"Matricola": "906569",
"OraMov": "2020-10-26T23:00:00Z",
"DescCommessa": "Purch",
"QtyMov": 0,
"DataMov": "2020-10-27T12:00:00Z",
"AddFld02": "baba2",
"Lotto": "29082019",
"Commessa": "LP00000021",
"AddFld03": "baba3",
"Operatore": "1524",
"Macchina": "",
"CodArt": "",
"Zona": "1",
"Piano": "10",
"AddFld01": "baba"
}
]
Can you help me understand what I am doing wrong? Maybe the error is in the code structure?
Thank you!