This project has moved. For the latest updates, please go here.

grid filter

Oct 26, 2016 at 8:28 AM
how i can get the filter create by user in header ??
i need to get the filter for use in fetchxml
Coordinator
Oct 26, 2016 at 6:59 PM
In the source, search for the following functions in the dcrmeditabletablegrid.js:

Handles setting of the inline filter by user in the header
self.SetFetchXmlFiltered = function (.........

Handles getting an inline filter by schema name. Called internally before fetching data (load, refresh, ...)
self.GetInlineFilterBySchemaName = function (schemaname)

Handles clearing of all the inline filters
self.ClearInlineFilters = function (............

Mehrdad
Oct 31, 2016 at 9:24 AM
b.SetFetchXmlFiltered = function (a, c, d, e, f, g, h, i)
{
 if (b.GridFetchXml.InlineFilters.length > 0) 
     for (var j = 0; j < b.GridFetchXml.InlineFilters.length; j++) 
         if (b.GridFetchXml.InlineFilters[j].Schema == a) 
             return b.GridFetchXml.InlineFilters[j].Filter = c, b.GridFetchXml.InlineFilters[j].Operator = d, b.GridFetchXml.InlineFilters[j].Value = e, b.GridFetchXml.InlineFilters[j].FecthOp = f, b.GridFetchXml.InlineFilters[j].FetchValue = g, b.GridFetchXml.InlineFilters[j].LookupGuid = h, void (b.GridFetchXml.InlineFilters[j].LookupUiType = i); b.GridFetchXml.InlineFilters.push({ Schema: a, Filter: c, Operator: d, Value: e, FecthOp: f, FetchValue: g, LookupGuid: h, LookupUiType: i }) 
                     } 




how i get the fetchxrml from this function ???
Coordinator
Oct 31, 2016 at 4:43 PM
The Filter property contains pre build condition fetch XML values. Other properties contains various fetch parts. Examples:
      <condition attribute="parentaccountid" operator="eq" uitype="account" value="{FEE239A4-1528-E611-80DD-08002738AA19}" />
      <condition attribute="preferredappointmentdaycode" operator="not-null" />
      <condition attribute="createdon" operator="last-x-days" value="5" />