I built a query to expose as an API which then gets picked up in a power automate flow and up to now this has been running fine.
Yesterday I updated symbols has I had to expose another table as API, we’ve since upgraded to version 24.5.
Today I got this response:
{
“status”: 400,
“message”: “ErrorCode: Application_InvalidOptionEnumValue ‘Recurring_x0020_Invoice’ is not an option. The existing options are: Quote,Order,Invoice,Credit Memo,Blanket Order,Return Order,Recurring Invoice CorrelationId: 8d4596be-42c4-45a8-b8a0-32ae89a10a0a.\r\nclientRequestId: 2819206e-a71e-4a47-aebf-54ec10482410”,
“error”: {
“message”: “ErrorCode: Application_InvalidOptionEnumValue ‘Recurring_x0020_Invoice’ is not an option. The existing options are: Quote,Order,Invoice,Credit Memo,Blanket Order,Return Order,Recurring Invoice CorrelationId: 8d4596be-42c4-45a8-b8a0-32ae89a10a0a.”
},
“source”: “api.businesscentral.dynamics.com”,
“errors”: []
}
and the reason appears to be how the data is coming out of the query has changed, see attached, the encoding x0020 obviously isn’t a valid document type so the flow throws a wobbler

I can attempt to rebuild the query from scratch, but I didn’t touch it…
The raw data inside BC hasn’t changed so it has everything to do with how the SOD is dealing with it
It’s a change from Microsoft, I did a video on it a while ago: https://youtu.be/600q1uTMIuk
I did add a helper function in the Simple Object Designer on the API card called “Add Enum Companion Text Field”, this will add an extra field with the old value.
Ah okay perfect!
Apologies, where do I find this?
Open the API card. If it’s not there, you need to upgrade your Simple Object Designer, see here how: https://www.youtube.com/watch?v=Ei2cf236KWc
thanks for this, it is really helpful