Ejemplo n.º 1
0
 /// <summary>
 /// Rerieve all entities with the given filter conditions
 /// </summary>
 /// <param name="service"></param>
 /// <param name="config"></param>
 /// <returns></returns>
 public static List <EntityMetadata> RetrieveAllEntities(IOrganizationService service, ConfigurationInfo config)
 {
     return(RetrieveAllEntities(service, config.EntityRequestFilters, config.RetrieveAsIfPublished));
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Retrieve an Entity Key Metadata record
        /// </summary>
        /// <param name="service"></param>
        /// <param name="config"></param>
        /// <param name="entity"></param>
        /// <param name="retrieveAsIfPublished"></param>
        /// <returns></returns>
        public static EntityKeyMetadata RetrieveEntityKey(IOrganizationService service, ConfigurationInfo config, EntityMetadata entity, bool retrieveAsIfPublished)
        {
            var req = new RetrieveEntityKeyRequest()
            {
                EntityLogicalName     = entity.LogicalName,
                RetrieveAsIfPublished = true
            };

            var resp = service.Execute(req) as RetrieveEntityKeyResponse;

            return(resp.EntityKeyMetadata);
        }