to get a personalized navigation.
to get a personalized navigation.
I have a PO line with a non-stock item, default cost account 4200. I try to update it with a PUT request and the following payload. I get a 204 response, but the line account is still 4200.
Solved! Go to Solution.
Hello,
We ran into a problem here. The work around we implemented was to delete the original line, and then insert a new one, for example like this: PUT https://integration.visma.net/API/controller/api/v1/purchaseOrder/
{
"lines": [
{
"operation": "Insert",
"project": {
"value": "58"
},
"projectTask": {
"value": "100"
},
"warehouse": {
"value": "P"
},
"account": {
"value": "4010"
},
"orderQty": {
"value": 1
},
"inventory": {
"value": "02"
}
}
]
}
The problem is when the nonStock inventoryItem '02' has a default account which is not part of a project accounting group. In that case I get "Error: Inserting 'Purchase order line' record raised at least one error. Please review the errors.\r\nError: 'Project' cannot be empty". Was it always like this? I am pretty sure this worked a couple months ago, but I can't find anything related in the patch notes.
The reason the default account needs to not be project enabled is that otherwise the default project is null which is very frustrating for the user.
Sounds good.
If it gets flagged as a bug, do you have an idea of when it might be fixed? Its a key part of a customer solution we are building at the moment. Should I just go the replace line route?
Hi,
Unfortunately, we can't provide an ETA right now. We'll continue to update this thread when we have more information.
For the moment, that sounds like the best workaround.
Hi,
We can confirm that sending a PUT with accountNumber resets the lines field to the default value of the non-stock item.
We'll continue testing and report this to the development team.
Thank you.
Copyright © 2022 Visma.com. All rights reserved.