var fetchXml = @"<fetch version='1.0' output-format='xml-platform' mapping='logical'>
<entity name='account'>
<attribute name='fs_category' />
<attribute name='fs_parentaccountcode' />
<attribute name='parentaccountid' />
<attribute name='accountid' />
<attribute name='ownerid' />
<attribute name='telephone1' />
<attribute name='emailaddress1' />
<attribute name='primarycontactid' />
<attribute name='modifiedon' />
<attribute name='accountnumber' />
<attribute name='modifiedby' />
<attribute name='createdon' />
<attribute name='createdby' />
<attribute name='fs_totalrevenue' />
<attribute name='statuscode' />
<attribute name='defaultpricelevelid' />
<attribute name='fs_salessupporter' />
<attribute name='fs_remarksforprocurement' />
<attribute name='fs_salesteam2' />
<attribute name='fs_market' />
<attribute name='fs_nativeaccountname' />
<order attribute='createdon' descending='true' />
<link-entity alias='a_5e98d04200bb494ab231eadc8d4a94ec' name='systemuser' from='systemuserid' to='owninguser' link-type='outer' visible='false'>
<attribute name='fs_accountid' />
</link-entity>
</entity>
</fetch>";
FetchExpression qData = new FetchExpression(fetchXml);
EntityCollection lsData = service.RetrieveMultiple(qData);
if (lsData.Entities.Count > 0)
{
foreach (var item in lsData.Entities)
{
foreach (var attr in item.Attributes)
{
Console.Write("Keys Name = " + attr.Key.ToString());
}
}
}
My Issue : I use above code to retrieve attributes but when a record has attributes that is null value. I can not retrieve name of attribute that value is null.
Can you help me to fix this issue, please ?






