Esempio n. 1
0
        /// <summary>
        /// Returns a query containing all the fields, and required joins for all the given fields
        /// field examples are "did_contactid.firstname" or "customerid|contact.lastname"
        public static QueryExpression BuildSourceQuery(this XrmService xrmService, string sourceType, IEnumerable <string> fields)
        {
            var query = XrmService.BuildQuery(sourceType, new string[0], null, null);

            foreach (var field in fields)
            {
                xrmService.AddRequiredQueryJoins(query, field);
            }
            return(query);
        }