Paging with FetchXML

In MS CRM 2016 on-premises and online, fetchXML came up with a new attribute called “page”. Using this attribute we can set which page results we want.

<fetch mapping="logical" page="1" count="2">
 <entity name="account">
  <attribute name="accountid" />
  <attribute name="name" />
  <order attribute="name" />
 </entity>

</fetch>

Above query set query for accounts and limit the number of entities to 2 and return just the first page.


date and time field behavior in MS CRM

For CRM versions earlier than CRM Online 2015 Update 1 and CRM 2016 (on-premises), you cannot define the behavior of the date and time values. By default, the date and time values are stored as  UserLocal.

But in latest version,  behavior of date and time field is classified as 3 types.




UserLocal:
·         This behavior always stores the date and time in UTC format. While retrieving, it will returns date and time in UTC format.
·         When user trying to update date and time, if user enters date in UTC, system will update the value as it is or else it will convert entered date and time into UTC format then stores.
·         This behavior is used for system attributes like CreatedOn and ModifiedOn, and cannot be changed. You should use this behavior for custom attributes where you want to store date and time values with the time zone information
DateOnly:
·         This behavior will stores date only and time will be always stores as 12:00AM (00:00:00).
·         While retrieving the value also, time will always carries as 12:00AM.
·         This behavior should be used for custom attributes that store birthdays and anniversaries, where the time information is not required

TimeZoneIndependent:
·         Stores the date and time in system regardless of user time zone.
·         While updating the date and time also, it will stores date and time what user enters as it is.


·         This behavior should be used for attributes that store information such as check in and check out time for hotel

If you do not specify the behavior while creating a date and time attribute, the attribute is created with the UserLocal behavior by default



You may like below posts

Improving MS CRM Performance

Performance Center in MS CRM 2013

Upsert in MSCRM

Locking mechanism in MS CRM

Ticker Symbol Field in MS CRM

Themes in MS CRM

Enable Tracing in MS CRM

Calculated Field in Dynamics CRM 2015

IME Mode in MS CRM

Date and Time field in MS CRM

Date and Time fields generally are meant to store date and time. Did you ever tested, what is the max early date you can give in that field?


If not, try with 12/31/1899 if you are using MS CRM 2015 on premises with update 1 or earlier version. And, you will get an error as “The specified date format is invalid or the date is out of valid range”. Because maximum early date you can give is 1/1/1900 or later


Now, MS CRM easing this restriction in MS CRM 2015 online with update 1 or 2016 on-premises. In these versions, you can give date as early as “1/1/1753 12:00 AM



You may like below posts

Improving MS CRM Performance

Performance Center in MS CRM 2013

date and time field behavior in MS CRM

Upsert in MSCRM

Locking mechanism in MS CRM

Ticker Symbol Field in MS CRM

Themes in MS CRM

Enable Tracing in MS CRM

Calculated Field in Dynamics CRM 2015

IME Mode in MS CRM

Featured Post

Improving MS CRM Performance

Performance on MS CRM is always a crucial thing and we may follow different ways to achieve the performance thing. Below is the one more a...