Showing results for 
Search instead for 
Do you mean 

select/expand on custom fields

Copper Contributor
Posts: 220
Country: Netherlands

select/expand on custom fields

We've posted this before, but it still doesn't seem to work.


Why can't we do this:


/api/contacts?$filter=customFields/fact_betaald eq 'NEE'&$top=100&$select=id,fullName&$expand=customFields($select=fact_betaald)


Like we do this:


api/contacts?$filter=customFields/fact_betaald eq 'NEE'&$top=100&$select=id,fullName&$expand=businessAddress($select=city)


If we do the expand on customFields we get:


"Could not find a property named 'customFields' on type 'act.web.api.models.Contacts.Contact'."


ACT Certified Consultants
the Netherlands
Posts: 123
Country: USA

Re: select/expand on custom fields

The reason why $select or $expand doesn't work with custom fields is because customfields is just a collection of name value pairs (.NET dictionary<string, object>) and OData doesn't handle it the same as a complex type or related entity like businessAddress.  Microsoft OData $select|$expand doesn't seem to natively support this type.  Another issue that is causing this is that custom fields are not included on the OData IEDM models (design time model) because custom fields are dynamicly loaded (run time - no model).  To fix this issue the IEdm models would need to be built dyanmicly (like the API handles custom tables) with the metadata and not rely on hard-coded models.

Copper Super Contributor
Posts: 74
Country: Germany

Re: select/expand on custom fields

Any news here? We're still looking for a way to specifically SELECT a customFIeld and it's rough that that shouldn't work...

Kind Regards,
Melville-Schellmann GbR
Consulting and Development for CRM-Software