Showing posts with label Sharepoint Designer. Show all posts
Showing posts with label Sharepoint Designer. Show all posts

July 15, 2021

How to download the InfoPath form template (XSN file) when the Library/List contains more than 5000 items?

Introduction

We implemented the migration of the InfoPath forms from SharePoint On-Premises to the SharePoint Online environment for a Postal and Parcel company based out of Melbourne, Victoria, Australia.  The first step towards migration is to download the XSN file and then we can update it as per SharePoint Online version. We can download the XSN file from SharePoint Designer but when we have more than 5000 items the SharePoint Designer does not let us navigate to the directory where the InfoPath form is stored.


So in this blog, we will learn about how to download the InfoPath form template (XSN file) when the library/List has more than 5000 items. 

Scenario 

  • When we have to modify an InfoPath Form of a SharePoint list/library we download the InfoPath Form Template (XSN file) using SharePoint Designer. 
  • We modify that file in InfoPath Designer and then we republish it to the SharePoint List/Library. 

Issue 

  • In such situation,  when we try to navigate to the InfoPath form directory we face the restriction of SharePoint Designer as shown below. 

Solution 

    • To resolve this issue, we used a different approach to download the InfoPath form template (XSN file). 

    Steps to download the InfoPath form template (XSN file)

    Step 1:

    First, open the List/Library settings from where we need the InfoPath Form (XSN file) as shown below.  


    Step 2:

    • In the "Settings" click on the “Advance Settings” tab as shown below. 


    Step 3:

    • Now, Select “No” in the “Allow management of content types?” option. 
    • When we choose this option, the “Edit Template” option will appear after the Template URL as shown below. 


    By clicking on the “Edit Template”, the InfoPath form template (XSN file) will be downloaded and will be opened in the InfoPath Designer directly. 


    Conclusion

    This is how we can download the InfoPath form template (XSN file). Hope this helps you.


    If you have any questions you can reach out our SharePoint Consulting team here.

    December 23, 2020

    How to change Internal name of Custom List OR Document Library in SharePoint Online

    Issue:

    Recently, we have provided a build and guideline document to our client and by mistake they have set up a library name with in-correct internal name. In starting it worked well but as the additional functionality added, it broke. As the users have started working on that. So, we have to fix the internal name anyway on client environment.

    Our library internal name is “TrainingDocuments” and display name is “Training Documents”. but Client has set up “Training Documents” as internal name and this was not correct.



    Solution: 

    Initially, I thought it might not be possible and have to delete the document library and re-create from scratch on client environment. But then I've found 2 different ways to fix that.

    Approach 1: Using SharePoint Designer 2013

    Follow below steps to fix the internal name using SharePoint Designer 2013:

    • In SharePoint Designer, Open your site.
    • Navigate to All Files navigation node (not List and Libraries node),
      Note – you will need “Site Collection Administrator” permission in the site collection to see “All Files” option.

    • Find your list there
    • Right-click list
    • Rename.



    Approach 2 : Using PNP PowerShell

    In case you are not able to connect the site in the SharePoint designer or you do not have installed in your machine, you can do this using PNP PowerShell as well.

    Note - You will need Owner permission to run this PowerShell. 

    PowerShell to change Library Name:

     #Set Parameters  
     $SiteURL = "Site URL"  
     $ListName = "Library Internal Name"  
     $NewListURL = "New Library Name"  
     Connect-PnPOnline -Url $SiteURL -Credentials (Get-Credential)  
     $List= Get-PnPList -Identity $ListName -Includes RootFolder  
     $List.Rootfolder.MoveTo($NewListURL)  
     Invoke-PnPQuery  
     #this will change library title  
     Set-PnPList -Identity $ListName -Title $NewListURL  

    PowerShell to change List Name:

     $SiteURL = "Site URL"  
     $ListName = "List Internal Name"  
     $NewListURL = "New List Name"  
     #Connect to PNP Online  
     Connect-PnPOnline -Url $SiteURL -Credentials (Get-Credential)  
     Set-PnPList -Identity $ListName -Title $NewListURL  
    
    If you have any questions you can reach out our SharePoint Consulting team here.

    July 8, 2019

    This web site has been configured to disallow editing with SharePoint Designer. [Resolved]

    Problem Statement:
    While opening a SharePoint Site in SharePoint Designer, I was getting an error like "This web site has been configured to disallow editing with SharePoint Designer. Contact your web site administrator for more information".


    Resolution:
    To open specific site in SharePoint Designer, we need to verify the configuration at 3 levels:
    1. Web Application
    2. Site Collection
    3. Site 

    Let's verify the configuration at all 3 levels and update the configuration to allow specific site to be opened from SharePoint Designer.

    1. Web Application Level:
    • Open Central Administration.
    • Navigate to Application Management -> Manage web applications.
    • Select specific web application for which this issue is appearing.
    • Click General Settings -> SharePoint Designer.

    • "Enable SharePoint Designer" option must be selected in newly opened window. If this is unchecked, please check this option and click "OK".

    2. Site Collection Level:
    • Open SharePoint Site in browser for which this issue is appearing. If you are getting this issue for any sub-site, please open root level site in the browser.
    • Navigate to "Site Settings".
    • Click "SharePoint Designer Settings" under "Site Collection Administration" section. (User performing this action must have "Site Collection Administrator" rights).
    • "Enable SharePoint Designer" option must be selected. If this is unchecked, please check this option and click "OK".

    3. Site Level:
    • Login to SharePoint Server and open SharePoint Management Shell with Farm Administrator access rights.
    • Execute following PowerShell:
       $web = Get-SPWeb <http://name.domain.com/sites/sitename/sub-site>    
       $web.AllProperties  
      

    • You will notice that the vti_disablewebdesignfeatures2 contains a value of wdfopensite.
    • To resolve the issue, enter the following command in the same PowerShell window:
       $web.AllProperties.Remove("vti_disablewebdesignfeatures2")  
       $web.Update()  
      

    Conclusion:
    This way, we can verify if specific site is allowed to open in SharePoint Designer. If site is not allowed to open in SharePoint Designer, we can also update the configuration with steps mentioned above for Web Application Level, Site Collection Level as well as Site Level.

    If you have any questions you can reach out our SharePoint Consulting team here.

    November 15, 2016

    How to Clear cache in SharePoint Designer?

    When do you need to clear SharePoint Designer cache? 
    • Once you have opened SharePoint site with one user in SharePoint Designer, SPD will save connection details. Now, next time when you try to open same SharePoint site from SPD, It will open that site with saved connection details. If you want to open that site with different connection details (Credentials) then you need to clear SharePoint Designer cache. The cache is not even cleared after doing a reinstall, so this really is the only way to clear it.
    • Sometimes, SPD shows files are already checked out even though they aren't. While trying to check-in, SPD gives error "Cannot perform this operation. The file is no longer checked out or has been deleted." This is due to SharePoint Designer is out of sync with SharePoint and you have to clear cache in order to rebuild it.
    • The cache is not even cleared after doing a reinstall. So, how would you do it? Here, is the only way - detailed steps to clear cache in SharePoint Designer.

    Steps to Clear SharePoint Designer Cache:

    Step 1: 
    • Close SharePoint Designer if it is open.

    Step 2: [Clear Website Cache] 
    • Open Windows Explorer, Click the address bar and Paste “%USERPROFILE%\AppData\Local\Microsoft\WebsiteCache”.
    • Delete everything within this location.

    Step 3: [Clear Web Server Extensions Cache]
    • Open Windows Explorer, Click the address bar and Paste “%APPDATA%\Microsoft\Web Server Extensions\Cache”.
    • Delete everything in this location.

    Step 4: [Disable “Cache site data across SharePoint Designer sessions”]
    • Open SharePoint Designer 2010/2013.
    • Navigate to the "File" menu then select "Options" -> "General" -> "Application Options".


       
    • On the “General” tab, under the “General” heading, uncheck “Cache site data across SharePoint Designer sessions”.



    If you have any questions you can reach out our SharePoint Consulting team here.

    August 12, 2016

    SharePoint List View: Filter by Me and My SharePoint Groups

    Scenario 
    I have a SharePoint List containing task items. Tasks are assigned to a specific SharePoint Group or individual user. Each group has its own members. Requirement is, if current user is member of any of those groups, can see assigned tasks under My Tasks View.

    Approach
    There are few possible solutions, one of them is to modify Query filter via SharePoint Designer.

    Filtering a list view by group membership
    Step: 1
    Open SharePoint designer then open site.  Select the Task List under Lists and Libraries. (For example, here we have selected "ResourceDocumentTypes").


    Step: 2
    When you select task list you will see a panel on right side named "Views". Select the view that needs to be modified. (For this example it’s "My Events")







    Step: 3
    Note: If you cannot edit file, you must select advanced mode.

    In source view, search for <Query> and you will see View Query. If you have already modified view as filtered by [Me]. In that case, you need to modify the query which contains

    <Query><Where><Eq><FieldRef Name="AssignedTo"/><Value Type="Integer"><UserID 

    Type="Integer"/></Value></Eq></Where></Query>

    With below code:

    <Query>
    <Where>
    <Or>
    <Membership Type="CurrentUserGroups"><FieldRef Name=" AssignedTo"/>
    <Membership>
    <Eq>
    <FieldRef Name="AssignedTo"/><Value Type="Integer"><UserID Type="Integer"/></Value>
    </Eq>
    </Or>
    </Where>
    </Query>

    Be sure to change the "FieldRef Name" to your own field, and click Save. Done!

    Now, User can see all task items where “AssignedTo” field contains a SharePoint Group that logged in user is a member of and also assigned to him/her directly.

    Results
    Here is a list view showing all tasks assigned to different SharePoint Groups:

    Below is filtered list view showing only tasks assigned to SharePoint Groups for which current user is a member.


    If you have any questions you can reach out our SharePoint Consulting team here.

    July 28, 2016

    Add Listview webpart from one site to any other site within Site collection in SharePoint.

    Introduction: 
    To display content from any SharePoint List/Library in Site Page or Publishing Page within same site, we can use List View web part but has one limitation: both Site Page where web part will be added and SharePoint List must be on same site. What if, there is requirement to have List view web part to display content of SharePoint List to another site, is it possible?

    Here is the solution to display data from SharePoint list as List View web part from the site to its parent site within same site collection.

    Approach/Solution:
    1. Open SharePoint site in Microsoft SharePoint Designer 2010 where your document library/list exists.
    2. Click on "Lists and Libraries" sections.
    3. Open your document library.
    4. Select "All Documents" view from "Views" section.
    5. Select your document library list view web part in design mode.

    6. Select "Web Part" tab in Ribbon.
    7. Click on "To Site Gallery" in "Save Web Part" group.
    8. Give appropriate name and description to web part and press "ok".
    9. Now your document library is added as web part in web part gallery. 
    10. You can add this document library web part to parent site or any other site within same site collection by adding it as list view web part on page.
    11. Web part will be available under "Miscellaneous" web parts category.
    If you have any questions you can reach out our SharePoint Consulting team here.

    June 27, 2016

    SharePoint Survey List returns only 30 items while exporting to spreadsheet.

    Problem:
    While working with SharePoint Survey List and modifying items, we have encountered the following issue: When a user uses the “Export to Spreadsheet” function offered by SharePoint for Survey List, is not allowed to export more than 30 items, even if survey list contains more than 30 responses.

    The survey list is a special list, and cannot add new view to it as we do for other lists or libraries, but we can modify the existing views because actually it uses list view web part.

    Resolution:
    To resolve, please follow below steps:

    Step 1: Open SharePoint Site in SharePoint Designer



    1. Open SharePoint Designer and click on “Open Site”.
    2. Enter SharePoint Site URL (SharePoint Site that contains Survey List). This can be any - SharePoint On Premise OR SharePoint Online Site.
    3. Click on “Open”.


    Step 2: Navigate To Survey List In SharePoint Designer



    1. In navigation section go to Lists and Libraries.
    2. Navigate to survey list and click to open.

    Step 3: Open View in Advance Mode



    In navigation section go to Lists and Libraries, 
    1. Go to View Section and Right Click on View named “Overview”
    2. In pop-up menu select “Edit File in Advance Mode”.


    Step 4: Modify Export Limit


    1. Opening view in advance mode will open “overview.aspx” page in new tab.
    2. In <XmlDefinition> tag go to <RowLimit> as highlighted in above image.
    3. Change this tag to : 
                              Default tag: <RowLimit Paged=”FALSE”>30</RowLimit>
                              Change tag to:  <RowLimit Paged=”FALSE”>1000</RowLimit>
    4. Than press “ctrl+s” to save page. This will change item limit 30 to 1000.Now, Export to Excel can be done for 1000 items. This item limit can be increase as per number of items in list. 

    Note: Item limit can be increased up to threshold limit of the list. Default limit for threshold is 5000.

    So, this way we can export more than 30 items to spreadsheet from Survey List, too.

    If you have any questions you can reach out our SharePoint Consulting team here.

    September 4, 2013

    Unable to load workflow actions from server SharePoint Designer 2010

    Problem:

    When trying to open any workflow in SharePoint Designer, Error gets fired like:

    Unable to load workflow actions from the server….

    While checking ULS logs, below exception was found:

    SOAP exception: System.ArgumentException: An item with the same key has already been added. at
    System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at
    System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at
    System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value) at
    Microsoft.SharePoint.SoapServer.WebPartPagesWebService.GetWorkflowActionsFromFeatureElements(UInt32 currentLcid) at
    Microsoft.SharePoint.SoapServer.WebPartPagesWebService.FetchLegalWorkflowActions()

    Looking to exception details it becomes clear that this error is something related with duplication.

    Solution:

    Check Farm Level Solutions:
    Browse to Central administration ->Click System Settings ->Click Manage Farm Solutions.

    Then,

    Check Site Collection Level Solutions:
    Browse to Site collection ->Click Site Actions ->Site Settings ->Solutions (under Gallery).

    Put both of the browser windows side-by-side and see if you have anything activated at both scopes, means there is any solution which is deployed at farm level and the same solution is also uploaded and activated to solutions gallery at site collection level. If you find this, deactivating the particular solution at site collection level should do the trick to open workflows in SharePoint Designer.


    If you have any questions you can reach out our SharePoint Consulting team here.

    January 7, 2013

    Tabs in SharePoint 2010 Using Jquery

    First Create Simple aspx page in Sharepoint Designer. Add two placeholder First one additional page head Its holding any css and jQuery Scripts. Second one "> Place the Css and jQuery Script in additional Head Here is Script and Css :
    Note: you have to give​ jquery.js file reference in head

    <script type="text/javascript" src="/Style Library/js/jquery.js"></script>

    Tab Structure :

    <ul class="div-nav">
    <li class="choice show-hs activated">High School</li>
    <li class="choice show-ms">Middle School</li>
    <li class="choice show-es">Elementary School</li>
    </ul>
    Hide and Show Div Structure :

    <div class="content">
    <div class="calendar">
    <div class="webpart hs"></div>
    ​<div class="webpart ms"></div>
    ​​​<div class="webpart es"></div>
    </div></div>

    Additional Script :

    For Hide All Divs.
     
        $("#daily-wrapper .webpart").hide();
     
    Show First Div when loading page.
     
       $("#daily-wrapper .hs").fadeIn('slow');
     
    Tab Selected Class.
     
       $("ul.div-nav li.choice").click(function(){$(this).toggleClass("activated")});
     
    Remove Class when other one select.
     
       $("ul.div-nav li.choice").click(function(){$(this).siblings('ul.div-nav li').removeClass('activated')});
    Here is the Full Code
    you have to add Style & script in additional Head :

    <style type="text/css">
    #daily-wrapper{ border:solid 4px#999;width:500px;}
    #daily-wrapper ul.div-nav li {font-size:1.2em;margin:0px;border-right:1px solid #fff;}
    #daily-wrapper .calendar {position:relative;border:0px solid #333;float:left;}
    #daily-wrapper .calendar {margin-right:19px;}
    #daily-wrapper .content .calendar h2 {color:#000;margin-bottom:20px;}
    ul.div-nav {width:100%;background:#999;float:left;text-align:center;padding:0px;margin:0px;}
    ul.div-nav li {display:block;float:left;color:#fff;text-decoration:none;padding:10px;}
    ul.div-nav li:hover {background:#b80000;cursor:pointer;}
    ul.div-nav li.activated {background:#b80000;}
    </style>


    <script type="text/javascript">
    $("ul.div-nav").ready(function(){
     
     $("#daily-wrapper .webpart").hide();
     $("#daily-wrapper .hs").fadeIn('slow');
     $("ul.div-nav li.choice").click(function(){$(this).toggleClass("activated")});
     $("ul.div-nav li.choice").click(function(){$(this).siblings('ul.div-nav li').removeClass('activated')});
     $("ul.div-nav li.choice").click(function(){$("#daily-wrapper .webpart").fadeOut('fast')});
     $("ul.div-nav li.show-hs").click(function(){$("#daily-wrapper .webpart.hs").fadeIn('slow')});
     $("ul.div-nav li.show-ms").click(function(){$("#daily-wrapper .webpart.ms").fadeIn('slow')});
     $("ul.div-nav li.show-es").click(function(){$("#daily-wrapper .webpart.es").fadeIn('slow')});
     
    }); 
    </script>

    Structure :

    <div id="daily-wrapper">
    <ul class="div-nav">
    <li class="choice show-hs activated">High School</li>
    <li class="choice show-ms">Middle School</li>
    <li class="choice show-es">Elementary School</li>
    </ul>
    <div class="content">
    <div class="calendar">
    <div class="webpart hs">
    <h2>div first</h2>
    Lorem Ipsum is simply dummy text of the printing and typesetting industry.
    </div>
    <div class="webpart ms">
    <h2>div Secoond</h2>
    Lorem Ipsum is simply dummy text of the printing and typesetting industry.
     
    </div>
    <div class="webpart es"><h2>div Third</h2>
    Lorem Ipsum is simply dummy text of the printing and typesetting industry.
    </div>
    </div>
    </div>
    </div>

    If you have any questions you can reach out our SharePoint Consulting team here.