Display Document Library from Hub Site - sharepoint

Other than using the "embed" webpart, is there a way to display a document library from a Hub site on an associated site?
Or a way to change the look of the embedded library so that the header commands are not visible or the view defaults to its own view?
I want to get rid of the "new", "upload", "edit" headers but still allow filtering.

There is no option to display a document library from a hub site on an associated site except for the Embed web part.
If you only need to display files from an associated site, you could consider to use the "Highlighted Content" web part on a modern page.
It allows you to pick up contents, then filter by content type, file type, and managed properties. You can use the "path" managed property to only get documents from a specific library (Path Begins with {library url}).

Related

Creating A Custom Page in SAP Hybris

I am trying to create a unique page.
In general, i create a page template , from that template i create a page(in this case it is content page)
then i create content slot with a component within it and create a content slot name for its position at template or page,
afterwards i relate this slot with template or page.
But this time i am working on a different scenario,
What i am trying to do is making the management of this page much more easier.
The customer will create a bundle promotion page on backoffice but creating process contains too much steps on different locations.
I want to gather all these parameters to the page's administration panel.
For example content page's panel have some attributes but i am using my own component's attributes to fill the content slot.
Content Page Type's attributes : https://imgur.com/hGFMOnT .
I want to make a custom cms page type which will appear after pressing the plus sign,
for example Bundle Promotion Page (similar to content page).
creating page menu : https://imgur.com/4x5yfqO .
selecting page type : https://imgur.com/S3sm4Ay .
It must have a default template, content slot name, content slot with custom component in it.
All these parameters should be manageable from Bundle Promotion Page's administration panel.
Is this kind of concept possible with Hybris Backoffice?
Yes, it is possible.
please check this option in latest Hybris under WCMS menu in backoffice.There are default page types like email,document etc available as acceleratorservice extension. Custom page types can be created by including any custom attributes and content types.

Display SharePoint Documents Sub Grid on the MS Dynamics 365 form

I have a requirement to display SharePoint Documents Sub Grid on the MS crm Dynamics 365 Custom Entity Form.
Can anyone let me know, how to achieve this using Supported or unsupported way?
You can find solution here:
You may use the below line of code to set the Iframe url to display the subgrid in iframe:
Xrm.Page.getControl("IFRAME_Documents").setSrc(Xrm.Page.context.getClientUrl() + "/userdefined/areas.aspx?formid=" + CurrentFormId + "&inlineEdit=1&navItemName=Documents&oId=%7b" + recordId + "%7d&oType=" + oTypeCode + "&pagemode=iframe&rof=true&security=852023&tabSet=areaSPDocuments&theme=Outlook15White");
Where:
“IFRAME_Documents” is the Iframe name.
“CurrentFormId”= Is the Current selected form id which you can get using Xrm.Page.ui.formSelector.getCurrentItem().getId().replace("{", "").replace("}", "");
“recordId” = Record’s GUID
“oTypeCode” = Entity Type Code which you can get using Xrm.Page.context.getQueryStringParameters().etc;
This is how I did in D365. (Using Chrome made it easier)
Enable document management for the entity
When Documents tab shows
for the entity record open it.
Then open Chrome dev console (F12)
Grab the panel (which is actually an iframe) source. The URL is of format:
/userdefined/areas.aspx?appid=...........&formid=.......&inlineEdit=1&navItemName=Documents&oId=.....&oType=.....&pagemode=iframe&rof=true&security=......&tabSet=areaSPDocuments&theme=Outlook15White
Replace the dotted values in the source URL with appropriate values
and make the URL fully qualified prefixing with the root.
Just ensure not using any hardcoded GUIDs or IDs in the values. In this way this can be reused easily wherever needed.
Latest: Recent version has direct OOB customization to achieve this.
Dynamics 365: Related Documents Now Display on Record’s Main Form
Add or remove the SharePoint documents tab to the main form for any table
In short: Server to Server integration approach shows physical documents in crm grid. No need of iframe solution.
Old school List component integration has a limitation, it shows document location crm records in crm grid, so you need iframe solution to show physical docs from Sharepoint.
[Applicable to Server based Integration] - It will show Documents in the grid.
Open an Entity Web form where you want to display SharePoint document library.
Click on the Insert-tab, click on Sub-Grid, specify a name to sub-grid
In “Data Source” section select “Only related Records” from Records dropdown
Select “Document Location (Regarding)” in Entity dropdown
Select “Active Document Location” from Default View section [shown in Below Image]
Click on Set. Click on save then publish the customization
Reference
Update: [Applicable to List component Integration]
Associated view will show what we want but subgrid is not working as expected. Upon research, this is product limitation. Read more
sometimes it is desirable to have an “at a glance” view of documents associated with a record. In order to view the documents in SharePoint that are related to a record, the user must navigate to a related entities area outside of the form. (Similar to Connection, or other related entities)
For most related entities, a sub-grid can be used in the form to display the relationships immediately on the form, but there is no simple workaround for the Documents.
Another alternative is showing Associated view in IFRAME.
EDIT:
In latest Dynamics 365, CRM + Sharepoint integration using List component is deprecated. Only way is Server to Server (S2S) based CRM + Sharepoint integration is possible. This S2S approach shows documents in the associated grid & subgrid, not the doc location like in List component. CRM - Sharepoint wrapper taking care of conversion from CRM FetchXML to SP CAML query & give us the result we want.
The great thing about having the documents queried by CRM is that you
can create custom views of documents in the same way you would with
any other entity in CRM. When using the list component the default
view in SharePoint was rendered in the IFRAME meaning that to get new
columns you had to have list customisation privileges on SharePoint
such that all users would see the changes. With the new server to
server integration you can select SharePoint columns to include in
your own views and even add in your own filters using the CRM advance
find interface.
Read more.

Liferay, include one web content in another web content

Let's say I have web content, which is a modal dialog. Now I want to be able to reuse this content in several other web contents. What is the easiest way to achieve this without copy modal code to each web content? JavaScript is allowed.
Web content is a modal dialog? I don't understand the usecase, thus it's hard to give proper sample code.
If you're aware of the ID of the other webcontent that you want to use, you can retrieve this content through the API, e.g. by writing structures/templates. Templates are able to access the API and render other articles. Some of the API is hidden from templates by default, but you can revert this - look for "restricted" in portal.properties
The WCM API is named after its formal name "Journal*", check the API, e.g. JournalArticleService.

Create a web page in Orchard

I need to create a "custom" web page in Orchard. As I understand it, below are the steps I need to take to do so. Before I go down this somewhat lengthy process, are there any steps I'm missing or that I can skip?
Create a model
Create a content part and content part record which use the above model
Create a driver which implements the Display method which returns the "shape" of the content part
Create a shape template to render the shape returned from the above driver
Create a content type which holds the content part
Create a page which holds the content type
Add the page to my site
This page is "custom", in the sense that it needs to pull data from a web service and display it in an interactive way. When the user makes changes, those changes will need to be sent back to the web service.
Those are really steps for creating a content item. You would want to create a content item if your page should be treated as content - e.g. administrators can create, edit, publish, unpublish, and finally delete your page.
If you just want to create a simple page, then there is nothing to stop you from creating your own ASP MVC controller. You can define routes for it using Orchard's routing, and if you decorate it with a [Themed] attribute, it will even inherit the site's theme.

Set field via URL

Is it possible to have a field in the current item be changed by clicking a URL? The field would be a choice field with predefined choices.
Such as if the item field is currently:
Status: 2
If a user clicks the link, the field would now be:
Status: 3
If not, is there any other way for a user to easily change a field in the current item without actually haveing to visit the item?
Thanks!
Not Out Of The Box (OOTB) - but you've a few options.
Write an ASPX page to do what you want
Use something like SPServices and javascript to update the list item via the web services.
Use the Client Object Model (2010 only)
By the way - changing stuff on a 'get' can be dangerous as you can do malicious things - for example imagine you have a page that deletes the users account without any prompting (exact example doesn't matter) - what if someone clicks on that link by mistake or even worse what about an email sent with an image with that page as source URL - simply viewing the email could delete the users account.
It's not possible by using a GET request, but SharePoint 2010 is offering a RESTful API to manage ListItems from any client
The REST API is located within the virtual WebServices folgder under each SharePoint Site.
http://YourSharePointSite/_vti_bin/ListData.svc.
To perform an update on SharePoint ListItems you have to create a PUT Request. For more information on SharePoints REST API you should have a look at this MSDN site, there are also a lot of samples linked from this article.
Thorsten

Resources