European Sharepoint 2013 Hosting Blog

Articles about European Sharepoint Hosting Service

Follow me on TwitterRSS Feeds

  • Home
  • About

SharePoint 2013 Hosting – HostForLIFE :: Create A Folder And Set Unique Permission Using PnP PowerShell

Apr 5th

Posted by Peter in European SharePoint 2013 Hosting

In this blog, we are going to create a folder in Document Library and set unique permission to a user for this created folder using PnP Power Shell. The Administrator can set the required permission to a user depending on the organizational needs. Here we can use this script to set permission to a particular user. Please follow the below steps.
SharePoint-2013-Hosting1
Step 1
Run the ISE in administrative mode. Then declare variables named “sUrl”, “user”, “Folder Name”, and “SiteRelativeURL” to store the respective values.
Step 2
Connect to PnP online and get the credentials.
Connect-PnPOnline-Url$sUrl-Credentials (Get-Credential)
Step 3
To create the folder in the document, use the PnP commands as shown in the code.
Add-PnPFolder-Name$FolderName-Folder$SiteRelativeURL-ErrorActionStop
Step 4
Copy and run the below codes to create a folder in Document and to set unique permission in the folder for a user.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#Config Variables  
$sUrl = "https://contoso.sharepoint.com/sites/scriptEnable"  
$user = "srikanta@contoso.onmicrosoft.com"  
$FolderName = "Team Projects"  
$SiteRelativeURL = "/Shared Documents"  
#Site Relative URL in which the folder will be created  
Try {  
    Connect - PnPOnline - Url $sUrl - Credentials(Get - Credential)  
    # create folder using powershell  
    Add - PnPFolder - Name $FolderName - Folder $SiteRelativeURL - ErrorAction Stop  
    Write - host - f Green "New Folder '$FolderName' Created Sucessfully!"  
} catch {  
    write - host "Error: $($_.Exception.Message)" - foregroundcolor Red  
}  
try {  
    Write - host - f Green "Adding unique permission to '$FolderName'"  
    $Path = "/sites/scriptEnable/Shared%20Documents/" + $FolderName  
    #Set folder permissions  
    Set - PnPfolderPermission - List $ListName - identity $Path - User $user - AddRole "Edit"  
    Write - host "Successfully added permission" - ForegroundColor Green  
} catch {  
    write - host "Error: $($_.Exception.Message)" - foregroundcolor Red  
}
After running the script,
Folder “Team Project” is created successfully.
Now the permission is updated
Tweet
europe sharepoint 2013 hosting, fast SharePoint 2013 Hosting, France Sharepoint 2013 Hosting, free SharePoint 2013 Hosting, Hosting cheap europe sharepoint 2013 hosting, Hosting cheap european sharepoint server 2010 hosting, india SharePoint 2013 Hosting, recommended SharePoint 2013 Hosting, SharePoint 2013 Hosting belgium, SharePoint 2013 Hosting germany, SharePoint 2013 Hosting Italy, SharePoint 2013 Hosting netherlands, SharePoint 2013 Hosting poland, SharePoint 2013 Hosting review switzerland, SharePoint 2013 Hosting UK, SharePoint Hosting 2013 Paris Server, Spain Sharepoint 2013 Hosting, tips SharePoint 2013 Hosting, Top Sharepoint 2013 hosting

SharePoint 2013 Hosting – HostForLIFE :: Restore List From Existing In Modern SharePoint Online

Mar 25th

Posted by Peter in European SharePoint 2013 Hosting

Recently, we have observed that the save the list as a template option is missing for the Modern SharePoint Online site. Because of which many users are getting confused about how to restore their existing list to another site which is mostly required and quite normal in terms of SharePoint. Save as s template was a very handy option to copy list definition as well as to migrate its contents in some cases.
SharePoint-2013-Hosting1
Modern SharePoint Online is missing save as a template option for the SharePoint list.
We restore existing lists or libraries for various reasons,
  • To restore existing list(s) into another site collection because of similar requirements for restoring list definitions
  • Sometimes, we create development and production site collection. We create several lists and libraries on the development site and then after the completion of the development task, we again retore those lists and libraries into production.
  • Sometimes, we retore the list in the same site collection with a different name to reuse the existing list and modify or use it as it is for another requirement.
  • In some cases, we might need to restore into another tenant as well if we are working with a third-party or vendor for development or some purposes.
  • In some cases, we use this option to migrate list or libraries contents
This is one of the general requirements to restore the existing list and library. Since the missing save as a template option is missing in modern SharePoint, we have some alternative ways to accomplish the same restoring of the list.
In this article, I will show you the different ways of restoring the list from existing in Modern SharePoint. So far, I have found 3 alternative ways
  • Option 1: Create a new list from an existing list
  • Option 2: By using PnP, save a modern list as a template and restore
  • Option 3: By enable custom script in SharePoint Online

Create a new list from the Existing list

This option is quite fast, easy, user friendly, and most recommended where you can create a new list from the exiting option from another site collection.
Firstly, we need to create a new list from Site contents as shown
Open Destination Site collection -> Site Contents -> Click New -> Select List
Next, we will choose an option from the existing list as shown,
After selecting, from the existing list, you will get the option to choose site collection and list within that site collection as depicted,
Select the Site collection from which you want to restore the list and the list. Then you will get the option to add the list in the current site collection as demonstrated,
You can give a name, description, and option to show in site navigation as like creating a new list.
This is how you can restore the existing list template.
However, this option has some limitations which are listed below,
  • Some lists might not be compatible which has lookup columns
  • You cannot restore data
  • Some legacy lists cannot be restored
  • Some site collections are showing incompatible lists.

By using PowerShell, Save a modern list as a template

Using PowerShell, we can save a list as the template in modern sites both in team and communication sites including list definition and data.
For this option, you need to have PnP PowerShell installed on your pc. You need to run following PowerShell.

Explanation
First, we are defining siteUrl, listName (a list which we want to save as a template), templateName, and path variables with values.
Then connect to SharePoint online.
1
Connect-PnPOnline -Url $siteURL
At last, we are extracting list and data with these commands,
1
2
3
Get-PnPProvisioningTemplate -Handlers Lists -ListsToExtract $listName -Out ("{0}.xml" -f $templateName)  
 
Add-PnPDataRowsToProvisioningTemplate -path ("{0}.xml" -f $templateName) -List $listName -Query '<view></view>'
Additionally, we can add filters in data query.
Now, we have saved the list as a template. The second step is to add the template into the destination site collection.
We can achieve this by running this PowerShell.
1
2
3
4
5
6
7
8
9
10
$siteURL =  " https://YourSite/sites/SiteCollectionName2"  
 
$templateName = "listTemplate"    
 
$path = “C:\Users\rijwa\Documents”  
 
cd $path   
 
Connect-PnPOnline -Url $siteURL  
Apply-PnPProvisioningTemplate -Path ("{0}.xml" -f $templateName
This execution of command takes few minutes depending upon your list data.
After this, if we create a new list, we find this template in our site collection and we can restore the list.

By enabling custom script in SharePoint Online

Another option (not recommended) is by enabling custom scripts through SharePoint Admin Centre or PowerShell.
You can login to SharePoint Admin Centre -> Setting -> classic setting page.
Additionally, we can enable the specific site collection using the below PowerShell script.
1
2
3
4
5
6
7
8
9
#Variables for SharePoint Admin Center & Site Collection URL  
$AdminCenterURL = "https://site-admin.sharepoint.com/"  
$SiteURL="https://site.sharepoint.com/Sites/marketing"  
  
#Connect to SharePoint Online  
Connect-SPOService -url $AdminCenterURL -Credential (Get-Credential)  
  
#Disable DenyAddAndCustomizePages Flag  
Set-SPOSite $SiteURL -DenyAddAndCustomizePages $False
Note
To apply the changes for enabling custom scripting might take up to 24 hours.
After enabling the custom script, we will need to go to list settings, and in the above URL, just replace listedit.aspx with savetmpl.aspx manually to save the list as a template.
Tweet
europe sharepoint 2013 hosting, fast SharePoint 2013 Hosting, France Sharepoint 2013 Hosting, free SharePoint 2013 Hosting, Hosting cheap europe sharepoint 2013 hosting, Hosting cheap european sharepoint server 2010 hosting, india SharePoint 2013 Hosting, recommended SharePoint 2013 Hosting, SharePoint 2013 Hosting belgium, SharePoint 2013 Hosting germany, SharePoint 2013 Hosting Italy, SharePoint 2013 Hosting netherlands, SharePoint 2013 Hosting poland, SharePoint 2013 Hosting review switzerland, SharePoint 2013 Hosting UK, SharePoint Hosting 2013 Paris Server, Spain Sharepoint 2013 Hosting, tips SharePoint 2013 Hosting, Top Sharepoint 2013 hosting

SharePoint 2013 Hosting – HostForLIFE :: How To Add Image Upload Control In React Quill Rich Text Editor?

Mar 17th

Posted by Peter in European SharePoint 2013 Hosting

In this article, we will learn how can we allow users to upload images in a rich text editor in the SPFx web part.
SharePoint-2013-Hosting1
When you copy and paste the image in React quill text editor, it will be pasted successfully and if you inspect this image from the developer tool of the browser you can see there will be a base64 string of images.
And when you save it, it will not be saved in the rich text column of your SharePoint list. Even only copy-paste in a rich text column in the list directly will also not save the image. SharePoint column will store the image in a rich text editor if the reference is of any SharePoint itself or any image URL which is accessible anonymously.
So, let’s see how can we achieve image upload functionality in the SPFx web part’s rich text editor control.
Follow the below steps to achieve this functionality:

Steps

Step 1
Upload package of the react quill using the below command:
1
npm i react-quill
Step 2
Import package in SPFx web part as below:
1
import ReactQuill from <span class="string">'react-quill'</span>;
Step 3
Declare a global variable. This variable will be used as context for our rich text editor control.
1
var quillObj: any;
Step 4
Add react quill control in render method as below:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
&lt;ReactQuill  
 
              <span class="keyword">ref</span>={(el) =&gt; {  
 
                quillObj = el;  
 
              }}  
 
              value={<span class="keyword">this</span>.state.Description}  
 
              modules={{  
 
                toolbar: {  
 
                  container: [  
 
                    [{ <span class="string">'header'</span>: [1, 2, 3, 4, 5, 6, <span class="keyword">false</span>] }],  
 
                    [<span class="string">'bold'</span>, <span class="string">'italic'</span>, <span class="string">'underline'</span>],  
 
                    [{ <span class="string">'list'</span>: <span class="string">'ordered'</span> }, { <span class="string">'list'</span>: <span class="string">'bullet'</span> }],  
 
                    [{ <span class="string">'align'</span>: [] }],  
 
                    [<span class="string">'link'</span>, <span class="string">'image'</span>],  
 
                    [<span class="string">'clean'</span>],  
 
                    [{ <span class="string">'color'</span>: [] }]  
 
                  ],  
 
                  handlers: {  
 
                    image: <span class="keyword">this</span>.imageHandler  
 
                  }  
 
                },  
 
                table: <span class="keyword">true</span>  
 
              }}  
 
              placeholder=<span class="string">"Add a description of your event"</span>  
 
              onChange={(content, delta, source, editor) =&gt; <span class="keyword">this</span>.onDescriptionChange(content, editor)}  
 
              id=<span class="string">"txtDescription"</span>  
 
            /&gt;
  • In the above code, you can see [‘link’, ‘image’] in the container options. When you add an Image in the container array, it will display the image upload icon in the rich text control as shown in the below screenshot.
Step 5
Now when clicks on the Image upload icon, we need to define which method should be called. So we need to define this method in handlers. So in control, we need to define handlers in the toolbar section:
1
2
3
4
5
handlers: {  
 
   image: <span class="keyword">this</span>.imageHandler  
 
}
Step 6
Now imageHandler method will have code as below,
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<span class="keyword">public</span> async imageHandler() {  
 
    <span class="keyword">const</span> input = document.createElement(<span class="string">'input'</span>);  
 
  
 
    input.setAttribute(<span class="string">'type'</span>, <span class="string">'file'</span>);  
 
    input.setAttribute(<span class="string">'accept'</span>, <span class="string">'image/*'</span>);  
 
    input.click();  
 
  
 
    input.onchange = async () =&gt; {  
 
      var file: any = input.files[0];  
 
      var formData = <span class="keyword">new</span> FormData();  
 
  
 
      formData.append(<span class="string">'image'</span>, file);  
 
  
 
      var fileName = file.name;  
 
  
 
      <span class="keyword">const</span> res = await <span class="keyword">this</span>.uploadFiles(file, fileName, quillObj);  
 
    };  
 
  }
  • When the user clicks on the image icon of rich text control, it will call the above method. This method will create a control for file upload and call on the click method of file upload control.
  • So, on clicking the image icon of the rich text box, it will open the file selection popup and allow to select only the image file.
  • In imageHandler method, we also defined what should be done once the user selects the image from the file selection popup.
Step 7
Now, when the user selects the image, we need to upload the selected image in the particular SharePoint document library. So, create new document library if you want to upload an image in the specific document library, else you can also use the default available Shared Documents library.
Step 8
Here in the above code also you can see we are calling uploadFiles method. The code in the uploadfiles method will be as below,
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<span class="keyword">public</span> async uploadFiles(uploadFileObj, filename, quillObj) {  
 
    var libraryName = <span class="string">"ImageFiles"</span>;  
 
    var context = <span class="keyword">this</span>.props.context;  
 
    var siteUrl = <span class="keyword">this</span>.props.context.pageContext.site.absoluteUrl;  
 
  
 
    var currentdate = <span class="keyword">new</span> Date();  
 
    var fileNamePredecessor = currentdate.getDate().toString() + currentdate.getMonth().toString() + currentdate.getFullYear().toString() + currentdate.getTime().toString();  
 
  
 
    filename = fileNamePredecessor + filename;  
 
  
 
    <span class="comment">//To Upload in root folder</span>  
 
    var apiUrl = `${siteUrl}/_api/Web/Lists/getByTitle(<span class="string">'${libraryName}'</span>)/RootFolder/Files/Add(url=<span class="string">'${filename}'</span>, overwrite=<span class="keyword">true</span>)`;  
 
    <span class="keyword">const</span> digestCache: IDigestCache = <span class="keyword">this</span>.props.context.serviceScope.consume(DigestCache.serviceKey);  
 
    digestCache.fetchDigest(  
 
      <span class="keyword">this</span>.props.context.pageContext.web.serverRelativeUrl)  
 
      .then(async (digest: <span class="keyword">string</span>): Promise&lt;<span class="keyword">void</span>&gt; =&gt; {  
 
        <span class="keyword">try</span> {  
 
          <span class="keyword">if</span> (uploadFileObj != <span class="string">''</span>) {  
 
            fetch(apiUrl, {  
 
              method: <span class="string">'POST'</span>,  
 
              headers: {  
 
                <span class="string">'Content-Type'</span>: <span class="string">'application/json;odata=verbose'</span>,  
 
                <span class="string">"X-RequestDigest"</span>: digest  
 
              },  
 
              body: uploadFileObj <span class="comment">// This is your file object</span>  
 
            }).then((response) =&gt; {  
 
              console.log(response);  
 
              <span class="keyword">const</span> range = quillObj.getEditorSelection();  
 
  
 
              var res = siteUrl + <span class="string">"/"</span> + listName + <span class="string">"/"</span> + filename;  
 
  
 
              quillObj.getEditor().insertEmbed(range.index, <span class="string">'image'</span>, res);  
 
            }).<span class="keyword">catch</span>((error) =&gt;  
 
              console.log(error)  
 
            );  
 
          }  
 
        }  
 
        <span class="keyword">catch</span> (error) {  
 
          console.log(<span class="string">'uploadFiles : '</span> + error);  
 
        }  
 
  
 
      })  
 
  }
In the above code, the document library name is ImageFiles. Once the file is uploaded successfully, we will return the URL of the uploaded image to a rich text editor and will render the image in rich text control using the below line of code
  1. quillObj.getEditor().insertEmbed(range.index, ‘image’, res);
  • The image will be rendered at the particular place where the cursor’s position using quillObj which we have defined as a global variable and then used while rendering control.
  • Now when the user selects the image, it will first be uploaded to the SharePoint document library and then use the uploaded files URL to load the image in the rich text box.
  • When you inspect the image in rich text control, you can see the URL of the image, not the base 64 string of the image.
  • While saving into the list, when you get the value of rich text control, it will return the image control with the URL of the image. So in the list also it will store the URL of an image.
This is how we can use image upload functionality in the react quill rich text editor in the SPFx custom web part.
Tweet
europe sharepoint 2013 hosting, fast SharePoint 2013 Hosting, France Sharepoint 2013 Hosting, free SharePoint 2013 Hosting, Hosting cheap europe sharepoint 2013 hosting, Hosting cheap european sharepoint server 2010 hosting, india SharePoint 2013 Hosting, recommended SharePoint 2013 Hosting, SharePoint 2013 Hosting belgium, SharePoint 2013 Hosting germany, SharePoint 2013 Hosting Italy, SharePoint 2013 Hosting netherlands, SharePoint 2013 Hosting poland, SharePoint 2013 Hosting review switzerland, SharePoint 2013 Hosting UK, SharePoint Hosting 2013 Paris Server, Spain Sharepoint 2013 Hosting, tips SharePoint 2013 Hosting, Top Sharepoint 2013 hosting, trick

SharePoint 2013 Hosting – HostForLIFE :: How to Clear Your SharePoint Designer 2010/2013 Cache?

Mar 12th

Posted by Peter in European SharePoint 2013 Hosting

This is a quick tutorial covering how to clear your SPD 2013 Cache. That is handy, especially when working with SPD 2010 and SPD 2013.  Clearing the cache will remove any of your past connection history as well provide you a “clean slate” to work from.  The cache is not even cleared after doing a reinstall, so this really is the only way to clear it.

SharePoint-2013-Hosting1

Versioning with check-in/out are great but not always preferred, and certainly not infallible. As I learned on a project a few years ago that recently bit me again when my new machine was not similarly configured, SharePoint Designer has a dirty little habit of caching files, including say the XML/XSLT, JS and CSS you might be working with on your site.

No need to fret though; buried in the settings of each version is a toggle that will ensure SPD never sets you back by loading a cached file.

Procedure:

  1. Close SPD if it is open
  2. Open My Computer

    a.Click the address bar

  3. Paste in:
    %USERPROFILE%\AppData\Local\Microsoft\WebsiteCache
  4. Delete everything within this location
  5. Click the address bar
  6. Paste in:
    %APPDATA%\Microsoft\Web Server Extensions\Cache
  7. Delete everything in this location

SharePoint Designer 2010 and 2013

  1. Navigate to the “File” menu then select “Options” -> “General” -> “Application Options”.
  2. On the “General” tab, under the “General” heading, uncheck “Cache site data across SharePoint Designer sessions”.
This is a quick couple of steps for clearing your cache and to hopefully resolve SharePoint Designer anomalies that present themselves from time to time.
Tweet
europe sharepoint 2013 hosting, fast SharePoint 2013 Hosting, France Sharepoint 2013 Hosting, free SharePoint 2013 Hosting, Hosting cheap europe sharepoint 2013 hosting, Hosting cheap european sharepoint server 2010 hosting, india SharePoint 2013 Hosting, recommended SharePoint 2013 Hosting, SharePoint 2013 Hosting belgium, SharePoint 2013 Hosting germany, SharePoint 2013 Hosting Italy, SharePoint 2013 Hosting netherlands, SharePoint 2013 Hosting poland, SharePoint 2013 Hosting review switzerland, SharePoint 2013 Hosting UK, SharePoint Hosting 2013 Paris Server, Spain Sharepoint 2013 Hosting, tips SharePoint 2013 Hosting, Top Sharepoint 2013 hosting, trick

SharePoint 2013 Hosting – HostForLIFE.eu :: Format The SharePoint Modern Site List Form Using JSON Formatting

Mar 3rd

Posted by Peter in Other Related Post

We can configure the SharePoint modern site list form using JSON formatting, which has the following use cases:
  1. If you want to implement multiple column forms rather than existing single column look and feel
  2. If you want to hide and show field/column-based forms in a simple and easy way
  3. If you don’t have Power App license but still want to change some look and feel of list forms
  4. If you want to group the fields/columns in the list form

SharePoint-2013-Hosting1

Steps to use JSON formatting to change the form look and feel follows the below steps:
  • Open the New form of list
  • See the form is showing only one column view
  • Click on the highlighted icon and choose the below option
  • The below screen will appear, It will shows a dropdown with three options namely
    • Header
    • Body
    • Footer
  • Copy the JSON and paste in the field for header
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    {  
        "debugMode": true,  
        "elmType": "div",  
        "attributes": {  
            "class": "ms-borderColor-neutralTertiary"  
        },  
        "style": {  
            "width": "99%",  
            "border-top-width": "0px",  
            "border-bottom-width": "1px",  
            "border-left-width": "0px",  
            "border-right-width": "0px",  
            "border-style": "solid",  
            "margin-bottom": "16px",  
            "background-color": "#026d70"  
        },  
        "children": [{  
            "elmType": "div",  
            "style": {  
                "display": "flex",  
                "box-sizing": "border-box",  
                "align-items": "center"  
            },  
            "children": [{  
                "elmType": "div",  
                "attributes": {  
                    "iconName": "Group",  
                    -Use icon as per your requirement "class": "ms-fontSize-42 ms-fontWeight-regular ms-fontColor-white",  
                    "title": "Details"  
                },  
                "style": {  
                    "flex": "none",  
                    "padding": "0px",  
                    "padding-left": "5px",  
                    "height": "36px"  
                }  
            }]  
        }, {  
            "elmType": "div",  
            "attributes": {  
                "class": "ms-fontColor-neutralSecondary ms-fontWeight-bold ms-fontSize-24"  
            },  
            "style": {  
                "box-sizing": "border-box",  
                "width": "100%",  
                "text-align": "left",  
                "padding": "21px 12px",  
                "overflow": "hidden",  
                "color": "white"  
            },  
            "children": [{  
                "elmType": "div",  
                "txtContent": "New Form" - This is the Form Title  
            }]  
        }]  
    }
The above JSON is self-explanatory, which has three div.’s, first div is for main container div for header and next two for below…
    • For Icon
    • For Title
Click on preview button to see the applied JSON configuration to header.
  • For Body, copy and paste the below JSON, choose Body from dropdown first
    1
    2
    3
    4
    5
    6
    7
    8
    9
    {  
        "sections": [{  
            "displayname": "Group name 1",  
            "fields": ["Field Display name1", "Field Display name2"]  
        }, {  
            "displayname": "Group name 2",  
            "fields": ["Field Display name1", "Field Display name2"]  
        }]  
    }
Here in the above JSON, Section is used to divide the fields in multi column views. Use the column display name to put that column section if any field not mention the section then that field/column will automatically display in the last section.

You can see the JSON is self-explanatory so you can add any number of sections here in the JSON.

  • For Footer copy and pasting below JSON, buttons will not be associated with any part; i.e. it is not associated with Header, Body or Footer section.
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    {  
        "debugMode": true,  
        "elmType": "div",  
        "style": {  
            "width": "100%",  
            "text-align": "left",  
            "overflow": "hidden",  
            "border-top-width": "1px"  
        },  
        "children": [{  
            "elmType": "div",  
            "style": {  
                "width": "100%",  
                "margin-top": "20px",  
                "margin-bottom": "10px",  
                "height": "4px",  
                "background-color": "#026d70"  
            }  
        }]  
    }
The above JSON is just to add some border margin below the body, and you can refer the header JSON to add div children in this section if you want. Just complete all these steps and your list form will look better than the default list form, just click on Save button as highlighted in the below screen.
Format The SharePoint Modern Site List Form Using JSON Formatting
This formatting will apply to all three forms of SharePoint list form.
For more information please visit the Microsoft site.
Tweet
europe sharepoint 2013 hosting, fast SharePoint 2013 Hosting, France Sharepoint 2013 Hosting, free SharePoint 2013 Hosting, Hosting cheap europe sharepoint 2013 hosting, Hosting cheap european sharepoint server 2010 hosting, india SharePoint 2013 Hosting, recommended SharePoint 2013 Hosting, SharePoint 2013 Hosting belgium, SharePoint 2013 Hosting germany, SharePoint 2013 Hosting Italy, SharePoint 2013 Hosting netherlands, SharePoint 2013 Hosting poland, SharePoint 2013 Hosting review switzerland, SharePoint 2013 Hosting UK, SharePoint Hosting 2013 Paris Server, Spain Sharepoint 2013 Hosting, tips SharePoint 2013 Hosting, Top Sharepoint 2013 hosting, trick SharePoint 2013 Hosting

SharePoint Hosting – Custom RSS SPFx Feed WebPart In Modern UI

Feb 25th

Posted by Peter in European SharePoint 2013 Hosting

A client had a  requirement to display the RSS feed on a modern UI page for 40,000 users.
hostforlifebanner

Challenge

The main challenging part is that CORS has an issue with  reading RSS feeds (xml). If the RSS feed is in a JSON format then we may use jsonpdataType to resolve the CORS issue.
Modern UI supports out of the box RSS Feed web part. But it has some limitations which are  listed below:
  • This web part is available only for Office 365 Group Enabled team sites.
  • Users should have Outlook account and it has to be manually added to the Office 365 group.
  • Only supports 2500 users.
  • No options were available to alter the format in which information is displayed.
There are custom SPFx solutions available:
  • spfx-40-fantastics – RSS Feed Reader webpart
    URL – https://github.com/OlivierCC/spfx-40-fantastics/wiki/Rss-Reader
    This webpart solution is not working at the moment.
    Reference – https://github.com/OlivierCC/spfx-40-fantastics/issues/97
  • SP-Dev-fx Webparts – React RSS Reader webpart
    URL – https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples/react-rss-reader
    This solution uses the below ways to read RSS feed
  • Direct – This has an issue with CORS policy
  • 3rd party solutions like https://feed2json.org or https://rss2json.com.

    https://feed2json.org is open source but has limitations as below

  • It has to be hosted on a separate server
  • It does not support CORS.

    https://rss2json.com free version has limitations as below

  • It takes 1 hour to display the updates.
  • Supports a maximum of only  10,000 requests per day.
  • Maximum of  25 feeds were allocated per account

Solution

To overcome this we came up with this approach with the help of Microsoft Flow, SharePoint Lists and ReactSharePoint Framework Web part.
Note
Microsoft Flow license is needed.
RSS feeds are generally available in XML file format and contain the URL, title, and summary of each page to display. So we developed a Microsoft recurring flow which reads the RSS feed XML and updates a SharePoint List Column with the XML content.
SharePoint List
We created a SharePoint List with a multi-line text column.
Microsoft Flow
We developed a Microsoft recurring flow.
The explanation of the steps of the flow:
  1. Recurrence – specifies the schedule of execution of flow. We had scheduled it to execute the flow every 30 minutes.
  1. Initialize variable – This initializes a variable to save the RSS url.
  1. Get Item – This reads the RSS Feed url from a SharePoint List (We used a predefined SharePoint List to store the RSS Url. This also provides the facility to the end user to change the RSS Feed URL if needed).
  1. Apply to each – Assigns the RSS url variable with the value for RSS Feed url from the previous step.
  1. HTTP -Make a HTTP call with GET Method to read the text from RSS Feed XML.
  1. Update Item –Updates a SharePoint List multi-line text column with the output of HTTP call made in the previous step.
After all the above steps are completed, the execution of the flow will update the SharePoint List multi-line text column with XML content of the RSS Feed XML file.

React SharePoint Framework Web part

We developed a simple SharePoint client-side web part to display the RSS feed on Modern site page in the same format as the OOTB RSS Web part for Modern pages. Additionally, we can customize the display format for RSS as well with our custom web part solution.
In order to convert XML text to JSON text we used npm xml-js.
The web part directly queries the SharePoint List multi-line text column value using REST API Call. Then converts the stored XML data to JSON text and loops through all the RSS feed data to display it in descending format of Published Date.
Which problem have we resolved?
  1. Now, we are not depending on any third party webparts and third-party API to read RSS feed data, hence we don’t face any request and feed limits.
  2. Resolved CORS issue by directly accessing feed data from already-stored feed using MS Flow.
  3. We can customize the display format for RSS as well with our custom web part solution.
Tweet
cheap europe sharepoint 2013 hosting, cheap european sharepoint server 2010 hosting, europe sharepoint 2013 hosting, fast SharePoint 2013 Hosting, France Sharepoint 2013 Hosting, free SharePoint 2013 Hosting, india SharePoint 2013 Hosting, recommended SharePoint 2013 Hosting, SharePoint 2013 Hosting belgium, SharePoint 2013 Hosting germany, SharePoint 2013 Hosting Italy, SharePoint 2013 Hosting netherlands, SharePoint 2013 Hosting poland, SharePoint 2013 Hosting review switzerland, SharePoint 2013 Hosting UK, SharePoint Hosting 2013 Paris Server, Spain Sharepoint 2013 Hosting, tips SharePoint 2013 Hosting, Top Sharepoint 2013 hosting, trick SharePoint 2013 Hosting
12345»102030...Last »
  • BLOGROLL

    • ASP.NET BLOG
    • ASP.NET MVC BLOG
    • Christian BLOG
    • Cloud Hosting ASP.NET
    • Europe Cloud Linux Hosting
    • HostForLIFE Blogspot
    • HostForLife.eu
    • Hosting Cheap ASP.NET
    • IIS BLOG
    • Silverlight BLOG
    • Windows ASP Hosting Review
    • Windows BLOG
  • Featured On

    • Best Windows Hosting ASP.NET
    • Cheap Hosting ASP.NET
    • Cheap Hosting Windows
    • Cloud Hosting ASP.NET
    • Discount Windows Hosting
    • Full Trust Hosting ASP.NET
    • Hosting For Ecommerce
    • Hosting Review ASP.NET
    • I Host Azure
    • Reliable Hosting ASP.NET
    • Review Hosting ASP.NET
    • Windows Hosting Bulletin
    • Windows Hosting Leader
    • Windows Web Hosting Review
  • Tags

    Belgium Sharepoint 2013 Hosting Best sharepoint 2013 hosting Cheap and recommended sharepoint hosting cheap european sharepoint 2010 hosting cheap european sharepoint server 2010 hosting cheap europe sharepoint 2013 hosting cheap sharepoint 2010 europe hosting cheap sharepoint 2010 foundation hosting CSS in SPFx european sharepoint 2010 hosting European Sharepoint 2013 Hosting europe sharepoint 2013 hosting Europe Sharepoint Hosting fast SharePoint 2013 Hosting France Sharepoint 2013 Hosting free SharePoint 2013 Hosting Germany Sharepoint 2013 Hosting HostForLife HostForLife.eu Hosting cheap european sharepoint server 2010 hosting Hosting cheap europe sharepoint 2013 hosting Hosting europe sharepoint 2013 hosting Hungary Sharepoint 2013 Hosting india SharePoint 2013 Hosting Madrid Sharepoint 2013 Hosting Netherlands sharepoint 2013 hosting Norway Sharepoint 2013 Hosting Portugal Sharepoint 2013 Hosting recommended SharePoint 2013 Hosting Russia Sharepoint 2013 Hosting sharepoint 2010 europe hosting sharepoint 2010 foundation hosting sharepoint 2013 hosting SharePoint 2013 Hosting belgium SharePoint 2013 Hosting germany SharePoint 2013 Hosting Italy SharePoint 2013 Hosting netherlands SharePoint 2013 Hosting poland SharePoint 2013 Hosting review switzerland SharePoint 2013 Hosting UK SharePoint Hosting 2013 Paris Server Spain Sharepoint 2013 Hosting tips SharePoint 2013 Hosting Top Sharepoint 2013 hosting trick SharePoint 2013 Hosting
RSS Feeds XHTML 1.1 Top