I have a requirement to download the searched documents in search result webpart of search page to LAN folder.
Please help how to do the same using JSOM and JQUERY in script editor.
I have a requirement to download the searched documents in search result webpart of search page to LAN folder.
Please help how to do the same using JSOM and JQUERY in script editor.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Nanddeep NachanRank #38 · 35.2K reputationPosted Apr 11, 2018, 5:13 AM EDT
Namita Bhoi28 reputationPosted Apr 11, 2018, 5:35 AM EDT
Nanddeep NachanRank #38 · 35.2K reputationPosted Apr 11, 2018, 6:03 AM EDT
Namita Bhoi28 reputationPosted Apr 12, 2018, 3:01 AM EDT
Thanks Nanddeep. I have to download all the documents in bulk. Below is my JSOM code. I am getting handle of documents in results. please help me to download them. I am new for JSOM coding.
var clientContext = new SP.ClientContext('/..../');
var keywordQuery = new Microsoft.SharePoint.Client.Search.Query.KeywordQuery(clientContext);
keywordQuery.set_queryText(TreatyID);
var searchExecutor = new Microsoft.SharePoint.Client.Search.Query.SearchExecutor(clientContext);
results = searchExecutor.executeQuery(keywordQuery);
clientContext.executeQueryAsync(onQuerySuccess, onQueryFail);
function onQuerySuccess(sender, args)
{
$.each(results.m_value.ResultTables[0].ResultRows, function ()
{
});
}