Lately I was assigned a long standing issue in a well known organisation with Sharepoint 2013 on premise, in which some of its users have been getting this weird “Cannot complete this action” error screen whenever they delete a document from a file or modify a list view in their team sites.
If you are getting this error on console log, it’s likely your search isn’t working. Try searching something on your search centre it would likely be blank results.
This is due to the compilation setting in the web.config having debug value set to true. Set it to false, and the error will be gone.
Workflows play a big role in everyday’s Sharepoint ‘Business as Usual’ activities. Users need to get things approved by stakeholders before publishing the content to others. In Sharepoint, there’s a built in Approval workflow template that you can enable on any list or library (this template will only be visible once you activated the Workflows Site Collection Feature). Once enabled, we can setup an Approval workflow by configuring some settings as below:
A customer has requested whether it was possible to restore a OneDrive site that had been deleted when the user’s account was marked for deletion in AD. After a bit of research, I was able to restore the site back and retrieved the files (luckily it was deleted less than 30 days ago).
Handy lines for adding linked servers in your SQL farm:
exec sp_addlinkedserver @server = ‘SQLSERVERNAME’, @srvproduct = N”, @provider=N’SQLNCLI’, @datasrc = ‘SERVERNAME’
exec sp_addlinkedsrvlogin @rmtsrvname = ‘SQLSERVERNAME’, @useself = ‘false’, @locallogin = ‘login_svc’, @rmtuser = ‘user_svc’, @rmtpassword = ‘********’
Here’s a handy user defined function to split string into comma separated line:
/****** Object: UserDefinedFunction [dbo].[ufnSplitString] Script Date: 19/11/2015 11:18:20 AM ******/
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
CREATE FUNCTION [dbo].[ufnSplitString](
@Column int = 1
These are some of the commonly used SQL queries at work, just to note them down for easier access:
When using ORM, should always keep in mind that only one object scope is used. The example came with the package doesn’t really explain this well. Should always declare a page_init call which declares the object scope and store it in session and try to keep using it for any business operations:
Ever wanted to create a gradient image dynamically? This can easily be done using C# with the following snipplet of code. We can also specify the width, height, gradient direction (horizontal or vertical), and the two colors.
The following script will handle the touch and click event in iOS newly updated safari: