Hi, I'm trying to create a filter for addCustomFilter function where the value is an array of Guids (teamId), and the operator is 'in', but I can't seem to get the xml right.
I'm trying to iterate through the array and add a <value> tag for each guid in the array.
var userTeams = dataService.GetTeamsIdOfUser(userId[0].id);
var filter = "<filter type='and'><condition attribute='teamid'
operator='in'>";
userTeams.forEach(function (val) {
filter+= "<value='{" + val + "}'></value>"
});
filter += "</filter>";
Xrm.Page.getControl("mtx_assign2userteam").addCustomFilter(filter,"team");
can anyone show me what I'm doing wrong?
Thanks in advance!
*This post is locked for comments
I have the same question (0)