web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Blogs / HIMBAP / Fetching Data based on Data...

Fetching Data based on Datatime field in MS CRM 2011 plugin

Mahendar Pal Profile Picture Mahendar Pal 45,095

If you are looking for the code to retrieve data based on Datetime field you can use below code

private EntityCollection RetrieveData(DateTime _Date,IOrganizationService _iService)

        {

 QueryExpression _Query = new QueryExpressio{

    EntityName = “EntityName”, //Replace with entityname

    ColumnSet = new ColumnSet(“AttributeName”), //list of fields

         Criteria =

              {

              FilterOperator = LogicalOperator.And,

              Conditions =

                  {

                new ConditionExpression

                {

                 AttributeName=”_issuedate”, //Replace Condition attribute name

                 Operator=ConditionOperator.Equal,

                  Values={_Date } //Replace condition value

 

                 }

                  }

               }

 

           };

         EntityCollection _Entities = _iService.RetrieveMultiple(_Query);

Return _Entities;

}

 Enjoy !!!

 


Comments

*This post is locked for comments