The query I crafted works perfectly with SharePoint Sites
, but it seems to encounter issues when applied to the Onedrive Personal Site
for the SMLastModifiedDate
field. The query works and returns the result with the Modified
field with both the sharePoint and the onedrive.
In summary, the same query operates successfully with the Modified
field but encounters issues with the SMLastModifiedDate
field when working with the Onedrive Personal site.
FieldRef Name='SMLastModifiedDate' NOT WORKING
<View Scope='Recursive'>
<Query>
<Where>
<And>
<Geq>
<FieldRef Name='SMLastModifiedDate' />
<Value Type='DateTime' IncludeTimeValue='TRUE' StorageTZ='TRUE'>2024-04-03T10:41:56Z</Value>
</Geq>
<BeginsWith>
<FieldRef Name='FileRef' />
<Value Type='Text'>/personal/mustafa_gaziani_admin_testing_onmicrosoft_com/Documents/test_folder/</Value>
</BeginsWith>
</And>
</Where>
</Query>
<ViewFields>
<FieldRef Name='FileRef' />
<FieldRef Name='Created' />
<FieldRef Name='File_x0020_Size' />
<FieldRef Name='SMLastModifiedDate' />
</ViewFields>
<RowLimit Paged='TRUE'>5000</RowLimit>
</View>
FieldRef Name='Modified' WORKING
<View Scope='Recursive'>
<Query>
<Where>
<And>
<Geq>
<FieldRef Name='Modified' />
<Value Type='DateTime' IncludeTimeValue='TRUE' StorageTZ='TRUE'>2024-04-03T10:41:56Z</Value>
</Geq>
<BeginsWith>
<FieldRef Name='FileRef' />
<Value Type='Text'>/personal/mustafa_gaziani_admin_testing_onmicrosoft_com/Documents/test_folder/</Value>
</BeginsWith>
</And>
</Where>
</Query>
<ViewFields>
<FieldRef Name='FileRef' />
<FieldRef Name='Created' />
<FieldRef Name='File_x0020_Size' />
<FieldRef Name='Modified' />
</ViewFields>
<RowLimit Paged='TRUE'>5000</RowLimit>
</View>
Both of the above queries are executing for the Onedrive personal site, but the query with the SMLastModifiedDate
condition is not returning any results, even though it should return 2 records. However, the second query with the Modified
condition is returning 2 results as expected.