Fetch XML – Filter On Link Entity

Recently when I am working on a search core functionality, there is a challenge where I have made link-entity but need to do filtering.

There is an error when calling the API stating that 2 filter nodes is not allowed.

End up, I have used to put all the link-entity filter attributes into the main filter criteria.

Eg. Retrieve Contact that link to account, both contact and account have to do some filter criteria.

In the Fetch XML, simply put as below:

<condition entityname="account" attribute="name" operator="like" value="%test%">

With the entityname being stated, which mean it will filter for the link-entity – account instead of the main entity – contact.

Hope it helps.

Leave a Reply

Your email address will not be published. Required fields are marked *