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

Option field not returning correct value in API

(7) ShareShare
ReportReport
Posted on by 274
Hello, I created a Customer API page and the "Blocked" field is not returning the right value.
It should be blank, but it is returning "_x0020_".
Does anyone know how to resolve this?
Any help would be greatly appreciated, thank you!
 
This is how I added the Blocked field to the Customer API:
 
"Blocked" is set to blank on the customer card.
 
The API is returning "_x0020_" for the Blocked (the caption is Status) value.
 
 
I have the same question (0)
  • Suggested answer
    Teagen Boll Profile Picture
    1,376 Super User 2026 Season 1 on at
    That is the expected behaviour for some fields. x0020 represent the space " " character as part of certain API responses. You can decode values using AL with Text.Replace like this:
    procedure DecodeValue(InputText: Text): Text
    begin
        exit(InputText.Replace(' ', ' '));
    end;
     
  • Suggested answer
    YUN ZHU Profile Picture
    99,055 Super User 2026 Season 1 on at
    Hi, This is standard behavior; I've had this problem since I tested it a long time ago.
    More details:
    Hope the following can give you some hints.
     
    Thanks.
    ZHU
  • Suggested answer
    OussamaSabbouh Profile Picture
    12,803 Super User 2026 Season 1 on at
    Hello,
     
    just means the Blocked field is blank — it’s how Business Central encodes empty enum values in OData.
    You can handle it by either treating as “Not blocked” in your app or exposing a text field (e.g., BlockedText) that converts enum values to readable text.
     
    Regards,
    Oussama Sabbouh
  • Gerardo Rentería García Profile Picture
    25,555 Most Valuable Professional on at
  • Suggested answer
    Aman Kakkar Profile Picture
    2,977 Super User 2026 Season 1 on at
    Hi,
     
     
     
    Hope this helps.
    Aman K

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,926 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,158 Super User 2026 Season 1

#3
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 533 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans