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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

fetch xml with null values in attribute

(0) ShareShare
ReportReport
Posted on by 5

Hello, 

This must be a novice question. I am trying to query the table with attributes 

<fetch>
<entity name ="table">


<attribute name="attribute1" />
<attribute name="attribute2" />

</entity>
</fetch>

The problem is I am not able to get data of Attribute1 , when I query the table, out of 30 rows , 2 rows has values in it, still it think it's a null attribute does not show me the attribute.

Pls help me reconstruct the fetch xml to bring in the attribute even if it is null in some rows ,and when it has values in some rows. I need the output of the attribute when I run the fetch xml.

I have the same question (0)
  • necsa Profile Picture
    3,455 on at

    Hi,

    did you try to fetch over advanced search? also, you can use XrmToolBox FetchXML Builder and compare it with your fetch

  • Giorgio Zanoni Profile Picture
    74 on at

    Hi,

    null attribute are excluded in the response.

    So if result doesn't contains the attribute that attribute is null in "the DB" (let me say DB...).

    You must check if the response contains that attribute before get the attribute value otherwise you will keep an exception.

    Are you quering data client side (javascript) or server side (C#)?

    ps. If you are beginner welcome on board! ;)

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 170 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 70

#3
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans