Sharepoint Content Query Web part selective subsite - sharepoint

Dear SharePoint Expert,
I want to create a Content Query web part in SharePoint 2013 called "Latest Upload":
1. i created the web-part:
2.in query source: i selected --> Show items from the following site
and all sub-sites: i chose a site.
3.what i need to do is to exclude some of the folders or sub-sites that the query is retrieving data from.
**How can i accomplish that?**

Related

SharePoint 2019 - Create OAuth Request Within Display Template To Request An Image From Another Site Collection

We have a SharePoint 2019 environment with one publishing site and multiple authoring sites, we have pages on the publishing site that use the Content Query Web Part to return a document and it's metadata from whichever authoring site is requested.
We are running into issue with having the preview images for these documents displaying on the Publishing site due to issues with Auth0. We are looking to include code in our display template to request the image via OAuth/Low-Trust SharePoint Add-in, but are unsure how to go about doing to.
Currently the line within the display template that requests/renders the image is:
var pictureMarkup = "";

Dynamics CRM with Sharepoint integration issue

We've set up the Sharepoint integration for our Dynamics 365 online instance. It works fine.
On the document management tab I've chosen 16 entities to have sharepoint integration. The wizard does it's work and it claims that 16 folders have been created. In truth, only 15 have been created.
When I re-run the wizard, it claims that all 16 folders are existent. It also lists the URLs. 15 work, the 16th shows a 404 HTTP error.
No idea, why the wizard is acting up.
Any idea what I would need to do to manually setup the 16th folder? How's Dynamics linked to Sharepoint? Would it be good enough to create a document collection manually in Sharepoint?
Not sure why it didn't do that automatically for you.
When you run the wizard it creates locations in SharePoint, and in CRM; document location records that point to those locations in SharePoint. The link at a folder level is based simply on URL stored as text in CRM document location records.
You should be fine to create the location manually in SharePoint. You could also try deleting the document location records from CRM and running the wizard again. You could also check the document location records have the correct URL configured.
Related reading: Integrate Microsoft Dynamics 365 with SharePoint.
I solved the issue by access Sharepoint with the Sharepoint Designer.
I saw that the 16th element was already present but not as a list but as some other type (folder?).
Apparently, the wizard just checks whether an element with that name already exists but it doesn't check the type of the element.
Solution: I deleted the element with that name and ran the wizard again and now it's fine.

Sharepoint2010 - How to show latest Announcements from sub-sites onto main site

we have configured a sharepoint 2010 main site for all corporate users and department wise sub sites for each department need eg. HR, FINANCE, OPERATIONS and other related departments in the company.
every department have different announcements which need to be shown in main site's annoucement webpart.
can any body suggest how we can show latest announcements from each subsites on main site's announcement webpart.?
You can use content query web part, in the tool pane you can customize your query.

Adding a Custom Webpart to a Site Template in Sharepoint 2010

I tried to add a custom created webpart to a customized team site which I then saved as a template. The webpart in question worked fine with the original site. However, when I created a new site based on this template(within the same server that the webpart in question was deployed to) the area which was supposed to contain the webpart was blank. Is there anything I'm missing or is it not possible to deploy a custom webpart into a custom site template?
Just guessing here because I haven't tried it but when you add a webpart to the page you are essentially customizing that page for that specific site. The webpart location is stored in the content database just for that individual page.
When you save a site as a template you are just saving the structure so when you provision a new site the customized page isn't there.

Add Custom Meta Data to a Team Site Programmatically

I have been asked to write a custom webpage in a web application integrated into a MOSS 2007 solution to allow users to create a teamsite using a custom template. No problem.
However, the user must have the ability to assign custom meta tags to the created team site to allow for specific searches, i.e. to assign country ("USA") and department ("Accounting") tags. Can anyone suggest a way of adding custom properties to the newly created team site via the SharePoint API?
Thanks, MagicAndi
There are 2 options:
You can use the Propertybag (SPWeb.Properties) of the SPWeb object of the new team site
You can add a list (invisble to users except admins) called "site tags" and add some items in there with key value pair fields i.e. item Country with value "USA" etc.

Resources