fetchxml

Select a percentage of records using CRM 2011 Dynamic Entity

别来无恙 提交于 2019-12-24 05:05:01
问题 I'm developing service which consumes CRM 2011 data via dynamic entities (as in, Microsoft.Xrm.Sdk.Entity, the late-binding method). I'm deliberately not using Xrm.cs method (early binding) in an attempt to keep my solution generic. Also, I want to avoid connecting to a CRM database directly (e.g. EDMX) as this would stop my solution being usable for a hosted CRM (e.g. with no direct DB access). I have the following (simplified) requirement, I'm really struggling with the selection criteria:

Are composite joins possible using FetchXml in Microsoft Dynamics CRM 4.0?

人走茶凉 提交于 2019-12-23 08:06:19
问题 I am using FetchXml to query CRM 4.0. We have a special case that will require a composite join between CRM entites. The FetchXml schema indicates that multiple link-entity elements are allowed, and it also indicates that multiple filter/condition elements can be added to a link-entity. The problem I'm facing is that the value attribute of the condition element does not appear to permit an entity/column name. It expects an explicitly declared value. For example, FetchXml lets you specify this

Are composite joins possible using FetchXml in Microsoft Dynamics CRM 4.0?

*爱你&永不变心* 提交于 2019-12-23 08:05:18
问题 I am using FetchXml to query CRM 4.0. We have a special case that will require a composite join between CRM entites. The FetchXml schema indicates that multiple link-entity elements are allowed, and it also indicates that multiple filter/condition elements can be added to a link-entity. The problem I'm facing is that the value attribute of the condition element does not appear to permit an entity/column name. It expects an explicitly declared value. For example, FetchXml lets you specify this

FetchXML: get count of records based on a field of a linked entity

安稳与你 提交于 2019-12-22 12:08:12
问题 I have a scenario where i want to get the count of people from an Entity who have multiple location address marked as current address in other linked entity. <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true" aggregate="true"> <entity name="client"> <attribute name="clientid"/> <attribute name="name"/> <attribute name="createdon"/> <order attribute="name" descending="false"/> <link-entity name="locationadd" from="clientid" to="clientid" alias="aa"> <attribute

convert my sql query to queryexpression or fetchxml in crm

烂漫一生 提交于 2019-12-20 07:29:20
问题 I have this SQL query where I am trying to fetch the opportunityId from opportunity entity for whom approvaldocument has not been created (approval document is the name of the other entity) .I dont think fetchxml supports such kind of query. I am new to crm and my project is in crm 4.0 version. here's the sql query: Select OpportunityId from opportunity AS c left JOIN (select a.opportunitynameid from opportunity o JOIN ApprovalDocument a ON a.opportunitynameid=o.OpportunityId) AS b ON c

createdon field date-time format

拟墨画扇 提交于 2019-12-14 03:57:15
问题 Compiling the following coe always get the same frustrating mistake. I'm trying to compare a "createdon" field to a the present date. I've tried several date format but stil not working... Error detail : "The date-time format for 23/05/2012 14:01:55 is invalid" Code snippet: DateTime d = DateTime.Now; String.Format("{0:dd/MM/YYYY HH:mm:ss}", d); FetchExpression fetch = new FetchExpression(@" <fetch distinct='false' mapping='logical'> <entity name='" + context.PrimaryEntityName + "'><filter

Aggregate Query limit exceeded?

若如初见. 提交于 2019-12-12 14:27:08
问题 I've got a 2 part question: First question : I know that there is a query limit of 5,000 records when querying records, for performance reasons, but is there a limit when doing an aggregate query? If so, what is it? I need only to query the number of records and for one entity I can get a result of 39,000+ records, but for another entity I see an error message like: System.ServiceModel.FaultException 1[Microsoft.Xrm.Sdk.OrganizationServiceFault]: AggregateQueryRecordLimit exceeded. Cannot

Add AND statement to WHERE clause in FETCH XML?

一世执手 提交于 2019-12-12 04:31:10
问题 We have this below fetchXML, I have a quick question wondering how I add this and statement to the WHERE clause: and ip.pcssu_quantityavailable >= sod.quantity - sod.quantityshipped to the fetchXML? <fetch mapping="logical" version="1.0"> <entity name="SalesOrder"> <attribute name="ordernumber" /> <attribute name="statuscode" /> <attribute name="statuscodename" /> <attribute name="pcssu_stockavailable" /> <filter> <condition attribute="statuscode" operator="eq" value="141560004" /> </filter>

calculate the time difference between two dates in HH:MM format using ssrs

梦想与她 提交于 2019-12-12 03:29:57
问题 I need to generate the time difference between tow dates in SSRS in HH:MM format. How can i achieve this? My data source is MS CRM FetchXML. Eg : Date1 : 01/01/2016 04:05 AM Date2 : 01/03/2016 02:15 PM Time Differece Should be : 58:10 Regards, Sandeep 回答1: I might be a little too late but was needing to calculate the elapsed time between two times. Hence I stumbled up this link https://social.msdn.microsoft.com/Forums/sqlserver/en-US/26d8b4fc-6862-42a0-ac7f-0caa93ba2fde/to-find-ellapse-time

FetchXML next page results

非 Y 不嫁゛ 提交于 2019-12-12 03:24:15
问题 I want to populate a grid with data from Dynamics CRM. I use fetchXML, to get for each page 10 records. I want to get to the next page, to retrieve the next 10 records. But this isn't happening, I'm using XRMToolbox to simulate the fetch query but it returns me the same results, regardless of the page attribute value. The fetchXML query is: <fetch version="1.0" output-format="xml-platform" mapping="logical" count="10" page="1" aggregate="true" distinct="false" > <entity name="webpage" >