Can any of you suggest on how to save the SharePoint search result that is clicked from list of all search results?
Loading
Can any of you suggest on how to save the SharePoint search result that is clicked from list of all search results?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Nanddeep NachanPosted Jul 5, 2018, 6:34 AM
Rohit KumarPosted Jul 5, 2018, 5:01 AM
I need all the details metioned in screenshot to be saved to a custom list on click of Add button
var cusTitle = ctx.CurrentItem.Title; - here is the error
alert(cusTitle);
var clientContext;
var scriptbase = _spPageContextInfo.webServerRelativeUrl + "/_layouts/15/";
$.getScript(scriptbase + "SP.js", function () {
clientContext = SP.ClientContext.get_current();
var oList = clientContext.get_web().get_lists().getByTitle("Contents");
var itemCreateInfo = new SP.ListItemCreationInformation();
var oListItem = oList.addItem(itemCreateInfo);
//var cusTitle = $getItemValue(ctx, "Title");
});
}
Nanddeep NachanPosted Jul 5, 2018, 4:56 AM
Rohit KumarPosted Jul 5, 2018, 4:52 AM
Nanddeep, Thanks for the link
It gives only the text searched by user.I need what search result user clicked i.e., with all metadata into list.
Nanddeep NachanPosted Jul 5, 2018, 4:43 AM