Announcements
No record found.
Hi
I have an extension of the employee list page on which I have applied a filter for all the records whose birthday is the current day. I wrote my logic including the date variables and the filters in the OnAfterGetRecord trigger of the Employee list page.
Try:
EmployeeTable.SetFilter(MonthName, '=%1', MonthToday1);
EmployeeTable.SetFilter(DayName, '=%1', DayToday1);
That should fix it. Or use setrange:
EmployeeTable.SetRange(MonthName, MonthToday1);
EmployeeTable.SetRange(DayName, DayToday1);
Tero
Hi Tero,
I used both the approaches. Error still persists.
I've quoted the message below:
Employee: There is no Employee within the filter.
Filters: MonthName: 9, DayName: 18
This appears on the message box.
Khudeja
Oh, Right, Your code should probably be in the OnOpenPage trigger to begin with. Can you copy paste the whole code here or iclude a picture of how the page looks in designer?
Hi Tero
Here is the screenshot of the page.
Thanks again
Apply your filters, in the OnOpenPage of the trigger.
Why can't you directly filter on the Birth Date field?
Like:
Employee.SetRange("Birth Date", Today);
Regards
Avinash B
Hi Avinash
This is because it will apply a filter on the year also which I do not want.
Hi,
Were you able to get this working? If not, go ahead and attach the al object here, I will have a look.
I used SetRange() in the OnOpenPage trigger and it works.
Thanks for helping out.
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.
Congratulations to a top community star!
In our never-ending quest to help the Dynamics 365 Community members get answers faster …
Welcome to the next edition of the Community Platform Update. This is a status …
Stay up to date on forum activity by subscribing.