web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Calling an API to change the value of FlowFields

(0) ShareShare
ReportReport
Posted on by 293

Hi all.

I need to call the items API to get the Inventory field, but not the total Inventory but the Inventory for a specific location.

How do I need to do the call to the API? I tried this way: 

items?$filter=Location_Filter eq 'SPAIN'

but BC gives me this error:

Could not find a property named 'Location_Filter' on type 'Microsoft.NAV.item
 
Thank you ever so much
  • Suggested answer
    Nitin Verma Profile Picture
    21,812 Moderator on at

    Hi JJMc2 ,

    Can you please replace your text with below?

    items?$filters=Location_Filter="SPAIN"

    and then please try.

  • JJMc Profile Picture
    293 on at

    Thank you for your answer.

    This does not give me the error, but it does not work. The Inventory field is the same as if I omit this filter

  • Suggested answer
    Nitin Verma Profile Picture
    21,812 Moderator on at

    Hi JJMc2,

    This was test and I was getting the response successfully.

    Can you please try this filter on Item list in business central and check if the result is same?

    Thanks

  • JJMc Profile Picture
    293 on at

    On BC, Item list, Inventory = 22.

    On Postman:

    "value": [

           {

               "@odata.etag": "W/\"JzIwOzE0Nzg1Mzc3OTE1MjE1NjI5Njk5MTswMDsn\"",

               "id": "beebbb78-2980-eb11-b853-000d3a20c029",

               "number": "1000",

               "displayName": "Bicicleta",

               "type": "Inventory",

               "itemCategoryId": "00000000-0000-0000-0000-000000000000",

               "itemCategoryCode": "",

               "blocked": false,

               "gtin": "",

               "inventory": 249,

               "unitPrice": 4,

  • Suggested answer
    Nitin Verma Profile Picture
    21,812 Moderator on at

    Hi,

    Initially you problem was below, which is corrected now.

    but BC gives me this error:

    Could not find a property named 'Location_Filter' on type 'Microsoft.NAV.item

    Now I can see your inventory not matching when you are putting filters, is this correct?

  • JJMc Profile Picture
    293 on at

    Yes it is.

  • cperezsx Profile Picture
    60 on at

    Hi,

    I think your problem its about the field its not published in the default API page, may you have to create another one and publish this field for make the correct call.

    docs.microsoft.com/.../devenv-develop-custom-api

    Regards,

  • Suggested answer
    Avinash B Profile Picture
    1,455 on at

    Hi

    Make sure Location_Filter is enabled on the API. Otherwise I doubt it will work.

    Hope it helps.

  • JJMc Profile Picture
    293 on at

    But the field "Location filter" is not a field itsef, it is a FlowFilter and it is used to change the value of FlowFields.

    I can not believe than Microsoft has not keept this in mind in order to be able to obtain in an API the correct value of FlowFileds dependind on users needs

  • cperezsx Profile Picture
    60 on at

    Hi,

    Im not sure about the actual page using as API, but if you inspect the code of page 5470 from the base application, you can confirm the flowfield of location filter its not exposed, then, you can't use it from the API.

    Another way its create your custom api, expose and try it.

    Regards,

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 719 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 410 Super User 2026 Season 2

#3
AndrewThomas81 Profile Picture

AndrewThomas81 369 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans