Hi All,
I'm trying to create a view using Advanced Find which will exclude contacts who are not eligible for the study. I have a custom entity volunteerauditnew which holds all the studies a contact has been assessed for and the final status.
For certain contacts, if they are marked as NOT Eligible for a study, a workflow runs which will reset the study field to blank and status is updated to Available after 30 days. These contacts reappears in the study view since the status is now Available.
To hide contacts who have been marked as Not Eligible from reappearing in the Study View after 30 days, I'm trying to Join the Contact entity with the volunteerauditnew entity and exclude contacts where the Not Eligible date is NOT NULL using the Advanced Find query.
I'm not getting the desired result as the contacts who are not eligible are still showing in the Study View

The contacts highlighted below in the view should not appearing in the View as there status is Not Eligible and as we can see in the volunteerauditnew table the noteligibledate column has a date value .
Contacts in View
| Id |
Full Name |
Conditions |
Contact Status |
Created On |
| 409f1dff-bcbc-e911-b083-00155d264e5f |
Jag G Test |
Asthma |
Available |
12/08/2019 04:52 |
| 2f5a9101-adb2-e911-b083-00155d264e5f |
Jim |
Asthma |
Available |
30/07/2019 09:32 |
| 1eaec299-83af-e911-b083-00155d264e5f |
Jul26 TEST |
Asthma |
Available |
26/07/2019 08:58 |
| b3c1cba0-b0bd-e911-b083-00155d264e5f |
RS C Test |
Asthma |
Available |
13/08/2019 09:56 |
volunteerauditnew records
| Id |
studyid |
volunteeridid |
name |
createdon |
noteligibledate |
| 6268b6ff-bcbc-e911-a878-000d3ae0e65e |
|
409f1dff-bcbc-e911-b083-00155d264e5f |
Jag G Test |
12/08/2019 04:52 |
|
| 3a662c98-bfbc-e911-a872-000d3ae0e4ef |
debbf603-107a-e911-a84f-000d3ae0b82e |
409f1dff-bcbc-e911-b083-00155d264e5f |
Jag G Test |
12/08/2019 05:11 |
12/08/2019 05:11 |
| 89349a70-efbc-e911-a878-000d3ae0e65e |
2939e9a1-5eed-e811-a843-000d3ae0c995 |
409f1dff-bcbc-e911-b083-00155d264e5f |
Jag G Test |
12/08/2019 10:53 |
|
| db04dfed-fbbc-e911-a878-000d3ae0e65e |
63ac9f50-69b2-e911-a85f-000d3ae09197 |
409f1dff-bcbc-e911-b083-00155d264e5f |
Jag G Test |
12/08/2019 12:23 |
12/08/2019 12:27 |
| 562cddd4-6fb2-e911-a872-000d3ae0e4ef |
63ac9f50-69b2-e911-a85f-000d3ae09197 |
5f0b8898-6fb2-e911-b083-00155d264e5f |
Part1 Study C |
30/07/2019 02:15 |
|
| 959987e5-24bf-e911-a870-000d3ae0eb8e |
63ac9f50-69b2-e911-a85f-000d3ae09197 |
b3c1cba0-b0bd-e911-b083-00155d264e5f |
RS C Test |
15/08/2019 06:21 |
15/08/2019 06:22 |
I also tried using xrmtoolbox to edit the linktype to outer as shown below but that did not work.
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true" >
<entity name="contact" >
<attribute name="fullname" />
<attribute name="contactid" />
<attribute name="volunteerstudyid" />
<attribute name="createdon" />
<order attribute="fullname" descending="false" />
<filter type="and" >
<condition attribute="registrationtype" operator="eq" value="0" />
<condition attribute="multiselectcondition" operator="eq" value="2" />
<condition attribute="volunteerstudyid" operator="null" />
</filter>
<link-entity name="volunteerauditnew" from="volunteeridid" to="contactid" link-type="outer" alias="ad" >
<filter type="and" >
<condition attribute="noteligibledate" operator="null" />
<condition attribute="studyid" operator="eq" uiname="Research Study C" uitype="study" value="{63AC9F50-69B2-E911-A85F-000D3AE09197}" />
</filter>
</link-entity>
</entity>
</fetch>
Any ideas how I can create a view using advanced find or xrmtoolbox to exclude contacts who have a NotEligible date in volunteerauditnew Entity?
Thanks
Jag