Try Microsoft Edge
A fast and secure browser that's designed for Windows 10
systemDateGet seems like AX(x++) function and SQL might not identify that.
Can you please try to replace that with SQL function GETDATE()
The code is conceptually flawed. Your code will execute when the view is synchronized to database, therefore you will get a hard-coded date that won't change until you synchronize the database again. You seem to want a filter based on the date when users are looking at the view, which your code can't achieve.
Don't do it in view at all. Simply use a query, where you can set the query range with systemDateGet() in code, or you can use a static value >(day(-365)).
When you're developing views, a very useful approach is looking at the generated T-SQL code. You would easily see that you didn't generate what you intended.
Worked perfectly :)
Cheers Sohaib - knew there'd be a simpler way of doing it
Business Applications communities