Posts

Showing posts with the label 2013

Error when activating feature of list instance

Image
Hello,

Always we separate our project in features :
feature for the list instance.
feature for the list definition.
that's will help us to keep data of our list when we disable and we enable features.

so we should activate first of all the list definition then the list instance:
when activating the list instance we get this error:


to fix this issue we should add the feature ID in the listInstance elements.xml:

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <ListInstance Title="TicketLD" OnQuickLaunch="TRUE" TemplateType="100" Url="Lists/Ticket" Description="Ticket List instance" FeatureId="2a3ef305-e7f8-4582-ad89-89612ff82d8b"></ListInstance>
</Elements>


Thanks for sharing.

Developer Dashbord SharePoint PowerShell

Developer Dashbord
$cs = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
$dash= $cs.DeveloperDashboardSettings
$dash.DisplayLevel
$dash.DisplayLevel="Off" // Ondemand to activate
$dash.Update()


Out-GridView

hello,

in powershell , the is a good tool to check logs or output from powerShell;

Get-SPFeature -Limit ALL | Out-GridView

PropretyBag with JavaScript in SharePoint 2013

Image
Hello,
as we know, Property bag are very important in SharePoint development, and to get it with JavaScript is very simple :



//wait until client object model dependencies are loaded before executing our code ExecuteOrDelayUntilScriptLoaded(getWebProperties, "sp.js"); varwebProperties;

SharePoint Framework / NodeJS ( setup envoriment)

Image
Hello SharePointiens,

i will show you how we configure our workspace to work with Sharepoint Framework:
Tools :
NodeJS server.
Visual Studio Code.
Cmder.

Open cmder :
d:/
mkdir workspace
cd workspace
mkdir SPFramework
cd SPFramework
mkdir HelloWorld
cd HelloWorld



now we should install yoman :
# install yo & gulp

npm install yo gulp # install Sharepoint generator npm install --global @microsoft/sharepoint-generator # create a new project yo @microsoft/sharepoint