none
CRM dynamics RRS feed

  • Pregunta

  • Hola a todos, estoy tratando de obtener las oportunidades y en conjunto el equipo de ventas tengo lo siguiente

                            EntityName = "opportunity",
                            //ColumnSet = new ColumnSet("opportunityid", "ownerid", "new_los", "parentaccountid", "name", "estimatedvalue", "actualvalue", "statecode", "parentcontactid", "createdon", "actualclosedate", "modifiedon"),
                            ColumnSet = new ColumnSet(true),
                            LinkEntities = {
                                new LinkEntity
                                {
                                    EntityAlias = "ac",
                                    Columns = new ColumnSet("record1id"),
                                    LinkFromEntityName = "opportunity",
                                    LinkFromAttributeName = "opportunityid",
                                    LinkToEntityName = "connection",
                                    LinkToAttributeName = "record2id",
                                    JoinOperator = JoinOperator.Inner,
                                    LinkCriteria = {
                                        FilterOperator = LogicalOperator.And,
                                        Conditions = {                                        
                                            new ConditionExpression ("record1objecttypecode", ConditionOperator.Equal, 8),
                                        }
                                    },                                
                            },
                            Criteria =
                                    {
                                        FilterOperator = LogicalOperator.And,
                                        Conditions =
                                            {                                          
                                                 new ConditionExpression ("statecode", ConditionOperator.In, 2,1),
                                             },
                                   },
                        };
                        query.Orders.Add(new OrderExpression("createdon", OrderType.Descending));

    Y no me trae todos los registros

    gracias de antemano

    jueves, 2 de mayo de 2019 21:33