Some thoughts on programming stuff

Category: General (Page 6 of 7)

SPFx solutions not showing in Apps in SharePoint On Premises

This post will cover a solution for a new problem related to SPFx solutions not showing in Apps in SharePoint On Premises. Before diving in the troubleshooting, let me give you some context!

In September 2017, Microsoft announced support to the SharePoint Framework in the (not so new) SharePoint 2016.  It is a great feature that will let developers explore the new framework in the cloud and on premises, allowing them to embrace the new modern era of SharePoint with SPFx apps.

Also, if you don’t know anything about the SharePoint Framework, please read this guidance to get in touch with the new trends for SharePoint Development.

The step-by-step to explore this development is pretty straightforward. Just do as the Microsoft tutorial suggests to build a web part and have an environment prepared for apps in your SharePoint 2016 farm.

Some important notes are:

  • The SharePoint Framework version must be 1.1.0 to work on SharePoint 2016;
  • SPFx extensions are in preview for this version;
  • The SharePoint Web Parts will be presented as normal Web Parts in the Ribbon;
  • There is no modern experience available yet;
  • You must use a CDN or even the Style Library to store the published files;

If everything is fine, you can just upload your App Package to your App Catalog and it will work.

But that wasn’t my case… as you may now…

Continue reading

How to delete a SharePoint list?

When a list is not necessary anymore, you may need to delete it. So how to delete a SharePoint list? This tutorial will help you on deleting that list! Oh, needless to say that you can restore it from the Recycle bin if you want, for a period of time.

According to Microsoft documentation, the sites objetive can be described like the paragraph below:

“A list in SharePoint is a collection of data that gives you and your co-workers a flexible way to organize information. Add columns for different types of data, such as text, currency, or multiple choice. Create views to display data effectively. Sort, group, format and filter lists to highlight the most important information. A list can include people, links, pictures, dates, and more. Track history of a list item over time with versions and use Microsoft Flow to automate processes. Unlike SharePoint document libraries, lists are not created by default when you create a site. Add them wherever you need to.”

Excluding a list in Modern interface in SharePoint

  • First you must be inside the SharePoint list;
  • After click in the Settings button;
  • Click in List settings;
  • Finally click in Delete this list.
Accessing list settings in Modern experience - How to delete a SharePoint list?
Accessing list settings in Modern experience
Delete the list - How to delete a SharePoint list?
Delete the list

Excluding a list in Classic interface in SharePoint

  • First you must be inside the SharePoint list;
  • After click in the tab called LIST;
  • Click in List Settings;
  • Finally click in Delete this list.
Accessing list settings in Classic Experience
- How to delete a SharePoint list?
Accessing list settings in Classic Experience
Delete the list - How to delete a SharePoint list?
Delete the list

I hope this blog post could help you on learning how to delete a SharePoint list properly. Also, if you want to be more dramatic, you can learn how to delete a SharePoint site too.

References:
Delete a SharePoint list

Identify which W3WP belongs to which application

This post will help you when you want to identify which W3WP belongs to which application. It comes in handy when we need to debug Visual Web Parts and Event Receivers deployed as Farm Solutions. The basic approach requires the user to open Visual Studio, attach the W3WP processes and refresh your page to start debugging.

Well, it’s pretty common in our daily life tasks (not so much since we all should move to the Client-side of the force) to have more than one W3WP available to attach. Usually we have one for your site, other for SharePoint Web Services, another for the SharePoint Central Admin and even more for any other Application Pool process being used in your Server.

But if you want to attach to just one process and make Visual Studio more performatic and responsive, how can you do that?

Just follow the steps in this post!

Continue reading

Study Guide for Exam 70-489 – Developing Microsoft SharePoint Server 2013 Advanced Solutions

Finally I could publish the Study Guide for Exam 70-489 – Developing Microsoft SharePoint Server 2013 Advanced Solution. It’s also based on Martin Bodocky’s preparation links with some additions, like the previous post for Study Guide for Exam 70-488 – Developing Microsoft SharePoint Server 2013 Core Solutions.

Exam on Microsoft’s website: https://www.microsoft.com/en-us/learning/exam-70-489.aspx

Actually I’ve decided to publish this one because the high number of page views for the last one. At the same time Microsoft launches SharePoint 2016 and keeps improving SharePoint Online, people still are looking for the SharePoint 2013 exams.

Continue reading

Sync SharePoint files with VS Code

The last three months I’ve been working less with SharePoint and more with Angular 4/Node JS projects. This change forced me to use less Visual Studio and dive deep into Visual Studio Code in almost every task. I must say that I fell in love with the editor and decided to search about how to sync SharePoint files with VS Code.

While working with VSCode, I’ve been testing some Gulp tasks like SPSave and SPSync for automatizing file changes to SharePoint, just for fun. Because I just can’t accept SharePoint Designer anymore, my patience with it ran out.
Also the Windows feature to map a network drive to a SharePoint library isn’t good too, at least for me.
So basically the gulp tasks did the trick, but they aren’t that easy to be understood for some more “traditional” programmers in my company, which would end with few adopters here.

So while searching for SharePoint extensions just for curiosity, I found the SPGO Extension and it really impressed me!

Basically it’s an extension that with some basic setup you can start syncing files from your computer with SharePoint libraries.

SPGo Extension

SPGo Extension

Continue reading

Repair Lookup column in SharePoint

Sometimes it’s necessary to repair Lookup column in SharePoint. Usually it can happen when we need to transport a list from a Production environment to a Development environment, just to reproduce some bug or situation with real world data. This is possible when you use the Save as Template feature, exporting it from an environment to another and then you recreate the list.

But, if you have Lookup fields it can give you some headaches. As soon as the list is restored in the other environment, the Internal GUIDs will be changed forever and any connection to the source list of the lookup column will be lost!

But it’s important to emphasize that Lookup columns are great as Microsoft says that “You can create relationships between lists by using a combination of unique columns, lookup columns, and relationship enforcement (cascade and restrict delete), all of which enhance your ability to create more sophisticated business solutions and help preserve the integrity of your data.”.

Continue reading

SPQuery best practices in SharePoint

This post will cover SPQuery best practices in SharePoint due to my recent experience with customers complaining about the performance of their SharePoint sites. This problem collaborated to create a bad impression of the product. “The page takes too long to load” or “Web Parts with pagination are terrible” were some of their complaints.

After the first contact with them, I usually asked for the source code to find out what was happening and do some troubleshooting. It didn’t take too much to find out that almost every case had performance issues due to queries being made with the SPList.Items property and followed by some LINQ query to filter the data.

Continue reading

Copy and paste images in SharePoint

This blog post covers a customized script that can be applied to SharePoint sites, letting you be able to copy and paste images in SharePoint. The content is focused on developers, because the installation process may not be so easy to be executed.

Copying and pasting images is a common customer demand to make their lifes easier when working with SharePoint pages and publishing new content. Although my automatic answer has been always “Just upload it through the ribbon, so you can add metadata and ensure content quality and reusability“, I must admit that this way isn’t THAT user-friendly.

That’s why I decided to develop some JavaScript code to add this functionality to my Web Pages. So the users would be able to add their images faster. Basically, I’ve created a GitHub repository to keep the code, so maybe someone can help me on refactoring it or adding support for others browsers.

The project to enable copy and paste images

Github project: https://github.com/wiliammbr/sp-copypasteimages

The project is a SharePoint provider-hosted app that publishes some JavaScript files to your Site Assets library. It was developed based on some SharePoint projects in the PnP – Patterns and Practices repository. Microsoft and the community maintains the repository updated. Also, it will add ScriptLinks to insert those script files into your pages. In my example, the app was hosted in an Azure Cloud Service.

But if your prefer, it’s possible to add those scripts into your Master Page files too, so you don’t need the Provider-hosted App approach.

Continue reading
« Older posts Newer posts »

© 2024 wiliammbr's blog

Theme by Anders NorenUp ↑