You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am creating a SPFX WebPart that runs on Sharepoint Online.
Question/Request
I am doing a Search for files and was working correctly,
For the files its important that i reflect the last update date that the file was modify by anyone but an app we have thar runs in the backend.
So what i am doing is, i am getting the ModifiedBy field, but i have run into somes Problems with this.
For some files this does not show me the correct modify by name, it shows me modifier on the file itself and not sharepoint.
And sometimes some files the version does not seem to be correct.
And sometimes because of the volume of files y get a error that seems that the connection has been dropped. so far i working with max of 4000 files in a search result
Here are some examples of my code
async function mapResultToDoc(item: IExtendedSearchResult, rowNum: number, _sp: SPFI): Promise {
Hi, after reviewing your code that seems to be the correct way to do it.
With that said, your solution could be optimized. Currently you are executing are single request for each file, which is likely the cause of all your performance/timeouts you mentioned in your issue. This would be a great place to do a batch call instead.
You can do batch calls of up to 100 calls at a time through a single request. This would reduce your overall calls from 4,000, down to 40.
What version of PnPjs library you are using
3.x
Minor Version Number
20
Target environment
SharePoint Framework
Additional environment details
I am creating a SPFX WebPart that runs on Sharepoint Online.
Question/Request
I am doing a Search for files and was working correctly,
For the files its important that i reflect the last update date that the file was modify by anyone but an app we have thar runs in the backend.
So what i am doing is, i am getting the ModifiedBy field, but i have run into somes Problems with this.
Here are some examples of my code
async function mapResultToDoc(item: IExtendedSearchResult, rowNum: number, _sp: SPFI): Promise {
}
is there a way i could bring the version history with one request for each file, as maybe a subobject?
The text was updated successfully, but these errors were encountered: