SharePoint 2010 Deployment Problem: Error occurred in deployment step ‘Retract Solution’

Today while i was working on a SharePoint 2010 project,i came across this problem: “Error occurred in deployment step ‘Retract Solution’: C:\Windows\Temp\{some guid with packagename}.wsp could not be created because the contents could not be found under id {some guid} in the configuration database. I was trying to figure out what the problem might be then i realized it was my fault :)) I stopped SharePoint 2010 Timer service before deploying.So starting the Timer Service from services.msc resolved my problem.

Read More

Limit NewsFeed to Display Latest 5 Posts in SharePoint 2013

I was having an issue to retrieve latest posts from newsfeed,lets say take 5 of them.Tried everything,but newsfeed webpart didnt support filtering according to my need. So i tried a “css-trick” code i found over the internet and improved it to my needs: function get5posts() { $(“.ms-microfeed-seeMoreThreadsDivContainer”).hide(); var limit = 5; $(“#ms-feedthreadsdiv .ms-microfeed-thread”).each(function (i) { if (i >= limit) { $(this).addClass(“ms-hide”); } }); } The code above shows only 5 posts on page load.But what happens if you add more in newsfeed? The 5 item limit exceeds and you need…

Read More

Considerations after Backup & Restore in SharePoint

These are what i experienced on some of the projects i have worked on: 1) Scripts,Styles,Fonts,Layouts needs to be published.Because they stay as draft items in your “_catalogs/masterpage” 2) The lists that use filtering needs to be updated.Sometimes it bugs out. 3) If you have used NewsFeed in your portal,its contents need to be deleted from MicroFeed special list.Just click on the guid item and it will show the users posts.This is important because people will see users’ posts from the test environment 4) Never ever use SPContext.Current.Web.List(“blabla”) to access…

Read More

Get Attachments using SPServices in SharePoint 2013

[sourcecode language=”javascript”] $().SPServices({ operation: "GetListItems", async: false, listName: "listname", completefunc: function (xData, Status) { $(xData.responseXML).SPFilterNode("z:row").each(function() { $().SPServices({ operation:’GetAttachmentCollection’, listName: "listname", ID: $(this).attr("ows_ID"), completefunc: function (xData, Status) { $(xData.responseXML).find("Attachments").each(function() { alert($(this).text()); }); } }); }); } });[/sourcecode] But theres a much more better way to do it,Thanks to Marc: [sourcecode language=”javascript”] var p = $().SPServices({ operation: "GetListItems", listName: "listname", CAMLQueryOptions: "<QueryOptions>" + "<IncludeAttachmentUrls>TRUE</IncludeAttachmentUrls>" + "</QueryOptions>" }); p.done(function() { $(p.responseXML).).SPFilterNode("z:row").each(function() { var attachments = []; var att = $(this).attr("ows_Attachments"); if(att !== "0") { attachments = att.split(";#"); // Now you’ll have an array…

Read More

Embedding UserControls to HTML page created by Design Manager

The design crash after you embed 2 or more User Controls in a html file.I have been figuring out a way to solve that problem today. You can register User Controls using this statement: [sourcecode language=”csharp”] <!–SPM:<%@Register TagPrefix="UC" TagName="SampleUC" src="~/_controltemplates/SampleIntranet/SampleUC.ascx"%>–> [/sourcecode] Normally you can use; [sourcecode language=”csharp”] <!–MS:{UserControl registration}–> [/sourcecode] but when you add 2 user controls same way,design crashes.So you need to close the MS statement using “ME”. Here’s how you can do it: [sourcecode language=”csharp”] <!–MS:<UC:SampleUC runat="server" id="SampleUCID">–>; <!–ME:</UC:SampleUC>–>; <!–MS:<UC:SampleUC2 runat="server" id="SampleUCID2">–> <!–ME:</UC:SampleUC2>–> [/sourcecode] Hope that fix helps you

Read More

Problem & Solution: This solution contains no resources scoped for a Web application…

When i tried to deploy a webpart to a webapplication using both PS and Central Administration,i got the following warning: This solution contains no resources scoped for a Web application and cannot be deployed to a particular Web application. It tried to deploy it to GAC which i didnt want.Because it needs to be deployed to a WebApplication in my farm Solution is; Started Visual Studio and the project,opened Package.Template.xml in an editor and edited the line in yellow: DeploymentTarget property needs to be set as “WebApplication”.Even though i changed it…

Read More

How To Start PhoneGap? #1 – An Explanation

The Industry isnt the same its 5 years ago.Nowadays every company,individual or a community MUST have a mobile app or mobile website. Since our option here is building Mobile Apps,I would like to help you get started with PhoneGap easily and fast enough. Before we start talking about what needs to be installed and which apps and frameworks we need to use developing,I would like to talk about wrong things you know about PhoneGap. Facts you know wrong or half-true about PhoneGap #1: PhoneGap isnt a WYSIWYG Editor Clearly,every “NATIVE…

Read More