18. April 2012 09:54
18. April 2012 11:19
18. April 2012 12:53
18. April 2012 14:24
18. April 2012 16:29
19. April 2012 08:13
26. April 2012 12:01
QueryExpression query = new QueryExpression();
query.EntityName = "new_produktallgemein";
query.ColumnSet = new ColumnSet();
query.AddLink("new_produktallgemein", "new_new_produktallgemein_new_produktallgemein", "new_new_produktallgemein_new_produktallgemein");
var men = service.RetrieveMultiple(query);
26. April 2012 14:03
26. April 2012 15:03
26. April 2012 15:58
public virtual BusinessEntityCollection Execute(CrmService crmService) {
QueryExpression query = new QueryExpression();
query.PageInfo = new PagingInfo();
query.PageInfo.Count = 50;
query.PageInfo.PageNumber = 1;
// Setup the query for the quote entity
query.EntityName = "quote";
// Specify the columns to retrieve
ColumnSet columns = new ColumnSet();
columns.Attributes = new String[] {
"quoteid"};
query.ColumnSet = columns;
// Create the link from the quote to the quotedetail entity
LinkEntity linkEntity1 = new LinkEntity();
linkEntity1.JoinOperator = JoinOperator.Natural;
linkEntity1.LinkFromEntityName = "quote";
linkEntity1.LinkFromAttributeName = "quoteid";
linkEntity1.LinkToEntityName = "quotedetail";
linkEntity1.LinkToAttributeName = "quoteid";
linkEntity1.LinkCriteria = new FilterExpression();
linkEntity1.LinkCriteria.FilterOperator = LogicalOperator.And;
// Create the productid condition
ConditionExpression condition1 = new ConditionExpression();
condition1.AttributeName = "productid";
condition1.Operator = ConditionOperator.Equal;
condition1.Values = new Object[] {'Hier die GUID einfügen'};
linkEntity1.LinkCriteria.Conditions = new ConditionExpression[] {
condition1};
query.LinkEntities = new LinkEntity[] {
linkEntity1};
// Execute the query and return the result
return crmService.RetrieveMultiple(query);
}
30. April 2012 09:36
ConditionExpression condition1 = new ConditionExpression();
condition1.AttributeName = "new_produktallgemeinidone";
condition1.Operator = ConditionOperator.Equal;
condition1.Values.Add(((EntityReference)targetEntity["new_allgemeinesproduktid"]).Id);
FilterExpression filter1 = new FilterExpression();
filter1.Conditions.Add(condition1);
QueryExpression query = new QueryExpression("new_new_produktallgemein_new_produktallgeme");
query.ColumnSet.AddColumns("new_produktallgemeinidone", "new_produktallgemeinidtwo");
query.Criteria.AddFilter(filter1);
EntityCollection result1 = service.RetrieveMultiple(query);