Hello,
I have a problem with my JavaScript. I try to add a custom filter on a field but i have an error with Date format.
My date is "Fri Apr 10 00:00:00 UTC+0200 2015" but when i use this date in my fetchxml, i get this error:
"The date-time format for Fri Apr 10 00:00:00 UTC+0200 2015 is invalid, or value is outside the supported range."
My JavaScript is :
var d = new Date();
var DateJour=new Date(d.getFullYear(),d.getMonth(),d.getDate(), 0, 0, 0, 0);
Xrm.Page.getControl("productid").addPreSearch(function () {
fetchXml = "<filter type='and'><condition attribute='new_date' operator='ge' value='" + DateJour + "' /></filter>";
Xrm.Page.getControl("productid").addCustomFilter(fetchXml);});
What format should I use ?
Thank-you very much for your help.
Best regards,
Florian
*This post is locked for comments
I have the same question (0)