Monday, July 25, 2016

SharePoint Updated Feature

Content Type New Button Order supported in the SharePoint modern document library experience
MC72513
Published On : Jul 15, 2016
Expires On : Aug 14, 2016
We are enabling support for the Content Type New Button Order feature in the modern experience in SharePoint Online document libraries. This change will begin rolling out today, July 15th and is expected to complete by the end of the month. Previously, document libraries that had this feature configured would automatically revert to classic mode. This will no longer happen, and custom content type ordering will be reflected in the new menu in the modern document library UX. This may result in some users seeing the modern document library for the first time. There is nothing you need to do to prepare for this change. Please click Additional Information to learn more.



Updated Feature: Modern SharePoint Lists
MC72990
Published On : Jul 22, 2016
Expires On : Aug 21, 2016
We’re making some changes to lists in SharePoint. Modern lists offer many UI enhancements such as inline creation of custom views and columns; improved mobile support; PowerApps and Flow integration; and the information panel. We’ve replaced the Ribbon with a clean, responsive command bar. We’re going to start rolling out modern lists for First Release Users in early August, with First Release Tenants and Production rings following.
How does this affect me?
: The modern list will be the default experience for all lists except as noted below. Some customizations are not yet supported in the modern experience, and if we detect such a customization we will automatically redirect users to the classic experience.
What do I need to do to prepare for this change?
Administrators may choose to disable the modern lists experience on a per list, per site, or tenant wide basis, using the same control previously offered for modern document libraries. If modern experiences are enabled, any SharePoint user will be able to preview the modern lists experience, regardless of First Release or Production rollout schedule, starting next week. Please watch the Message Center for specifics when preview becomes available. Please click Additional Information to learn more.

Monday, April 11, 2016

Apps for SharePoint Online(o365) on a non-development site collection






I got above error when try to deploy app in non-development site collection. so i created a development site collections in o365 admin center. Finally I could deploy the solution.


OR  We can make below configuration to deploy the app solutions.

So that’s a no-go, because “sideloading of apps is not enabled on this site“. After some research on the MSDN forums, I found a PowerShell script allowing you to enable Sideloading.  Because it’s not available in the interface, the only option you have is to run the PowerShell script to enable this feature. (There is not quite much information about this Sideloading thing yet though).
The first thing you have to do is download the SharePoint Online management Shell (link). The PowerShell script you can use is:

MORE INFO : http://www.alexandervanwynsberghe.be/debugging-apps-for-sharepoint-online/


Wednesday, March 23, 2016

Remove the Quick Launch in SharePoint Online


There are two ways to remove the Quick Launch in SharePoint 2013.

  1. The first is to open the site in Share Designer, and uncheck the option to “Display Quick Launch”. While this works, it doesn’t move the content to the left. You’re left with an empty space that doesn’t look great.



    2. Alter the CSS using a Script Editor web part. Place a Script Editor webpart anywhere on the page, and         add the following code. The first line removes the Quick Launch. The second line moves the code all             the way to the left.

<style>
.ms-core-navigation { DISPLAY: none }
#contentBox { margin-left: 0px }
</style>
 

Monday, February 8, 2016

Show online users count in SharePoint site

SharePoint site are more secure. So can use only https links in side them.
I have use a free widget to  show online user count. but i didnt work .

I made a customized version that widget to use in office 365 SharePoint.

Dowload the library :-  https://onedrive.live.com/redir?resid=1D7F31756D95FB7A!566&authkey=!AHBgHIO9oC0iftw&ithint=file%2cjs


Add the following script to your side (Or add to content editor)



<script id="_wauz68">var _wau = _wau || []; _wau.push(["classic", "9aa2far871tw", "z68"]); (function() { var s=document.createElement("script"); s.async=true; s.src="/sites/intranet/Style Library/EFL/js/classic.js"; document.getElementsByTagName("head")[0].appendChild(s); $("#asas").append(s); })(); </script>

Monday, December 14, 2015

The content database on the server is temporarily unavailable.

The content database on the server is temporarily unavailable.



When you try to deploy an app via Visual Studio, you might get the this error

Solution

Configure Managed Metadata service application correctly.

Check your domain ip in DNS server.(get your ip from ipconfing from CMD )
Also make sure you have the below service applications configured correctly

1. App Management Service Application.

2. Microsoft SharePoint Foundation Subscription Settings Service Application.

Then i looked in to Event Viewer. I found below problem 



Then I started  the Distributed Cache .



Then i deploy the solution the problem solved. 
:)

CAML Query for SharePoint


What is CAML?

  Ø  CAML - Collaborative Application Markup Language
  Ø  XML- Extensible Markup Language based query language
  Ø  Used to perform a query operation against SharePoint Lists
How SharePoint List Items are retrieved?
SharePoint List data can be retrieved in any one of the following ways:
1. Using the SharePoint object model – used when code runs on the server         (Example: Developing a web part or an application page)
2. Using the SharePoint Lists web service – used when your code doesn’t run on the server where the SharePoint is installed (Example: Developing a windows application)
3. Using Power shell –used mostly by the ADMIN of the SharePoint when they quickly want to retrieve some information from the SharePoint site

How does CAML query looks like?
As I already mentioned, it is XML based query language and it contains tags in it. The root element of the CAML query root element is Query. But it is not necessary to use Query element in the query you form.
Within the Query element you have two elements possible:

1. Where   – to filter the data
2. OrderBy – to categorize the data

simple structure of the CAML query is as follows:
<Query>
          <Where>
                   <Eq>
                             <FieldRef Name=”FieldName” />
                             <Value Type=”DataType”>Value</Value>
                   </Eq>
          </Where>
          <OrderBy>
                             <FieldRef Name=”FieldName” />
                             <FieldRef Name=”FieldName” />
          </OrderBy>
</Query>

Operators in CAML Query
From the above structure, we came to know that it uses Where and OrderBy elements to retrieve the data from the list.

Let us know about the operators present in the CAML query and its usage:
Inside the Where element
1. Logical Operators - AND, OR
2. Comparison Operators - Listed Below in the table
AND – Which takes two conditions are satisfied
OR – Which takes when either of the conditions is satisfied


Comparison Operators
Inside the OrderBy/GroupBy element
OrderBy – Which orders or sort the data depends upon the field (FieldRef element) given.
GroupBy – Which groups the data depends upon the group by field (FieldRef element) given.
Examples
Logical & Comparison Operators
Use of AND, Gt, Leq
<Query>
<Where>
<And>
<Gt>
<FieldRef Name="Quantity" />
<Value Type="Number">0</Value>
</Gt>
<Leq>
<FieldRef Name="Price" />
<Value Type="Number">2000</Value>
</Leq>
</And>
</Where>
</Query>
Use of OR, Gt, Leq
<Query>
<Where>
<Or>
     <Gt>
<FieldRef Name="Quantity" />
<Value Type="Number">0</Value>
     </Gt>
                     <Leq>
  <FieldRef Name="Price" />
<Value Type="Number">2000</Value>
     </Leq>
               </Or>
       </Where>
</Query>
Use of BeginsWith, Leq
<Query>
<Where>
<And>
      <BeginsWith>
  <FieldRef Name="Title" />
  <Value Type="Text">M</Value>
      </BeginsWith>
      <Leq>
     <FieldRef Name="Quantity" />
<Value Type="Number">1000</Value>
      </Leq>
</And>
</Where>
<OrderBy>
<FieldRef Name="Price" Ascending="False" />
</OrderBy>
</Query>
OrderBy Operator
<Query>
<Where>
<Or>
    <Gt>
<FieldRef Name="Quantity" />
<Value Type="Number">0</Value>
   </Gt>
      <Leq>
<FieldRef Name="Price" />
<Value Type="Number">2000</Value>
   </Leq>
</Or>
</Where>
<OrderBy>
<FieldRef Name="Price" Ascending="True" />
</OrderBy>
</Query>
Is it possible to write this queries without any errors manually?
Yes. But we will know the errors only after executing the program. Hence there is a free CAML query builder which will generate the query easily.

Caml Queries to Remember

No Filter
<View><ViewFields><FieldRef Name="Title" /><FieldRef Name="Column2" /></ViewFields></View>
With Row Limit
<View><RowLimit>10</RowLimit><ViewFields><FieldRef Name="Title" /><FieldRef Name="Column2" /></ViewFields></View>
Above two can  be used with CamlQuery object as view xml.
example
CamlQuery camlquery = new CamlQuery();
               camlquery.ViewXml = "<View><RowLimit>10</RowLimit><ViewFields><FieldRef Name='Title'/><FieldRef Name='FileRef'/><FieldRef Name='BasePath'/></ViewFields></View>";
           
   List sSCConfigList = clientContext.Web.Lists.GetByTitle("SSCConfig");
               clientContext.Load(sSCConfigList);
               clientContext.ExecuteQuery();
               var listItems = sSCConfigList.GetItems(camlquery);
Single Select
Example
<Query><Where><Eq><FieldRef Name="Title" /><Value Type="Text">ABC VALUE</Value></Eq></Where></Query>
Multiple Rows
Example
<Query><Where><Contains><FieldRef Name="Title" /><Value Type="Text">Some Text</Value></Contains></Where></Query>
In case of Rich Text field, you can use <![CDATA[]]> around the value to prevent parsing errors when passing HTML into the query. Or you can replace < with &lt;, > with &gt; and “ with &quot; and so on.
Other operators are <Geq/> for greater than and <Leq/> for less than
LookUps
Here we use LookupId=”true”.  By using this we can specify the id value in the value tag
Look up on Id
example
<Query><Where><Eq><FieldRef Name="SomeLookupcolumn" LookupId="TRUE" /><Value Type="Lookup">4</Value></Eq></Where></Query>
Here It will filter on ‘SomeLookupColumn’ column here based on look up id and not value.  This ensures unique value.
This can be used to get person or group also
example
Filter on Current User
Example
<Query><Where><Eq><FieldRef Name="Author" LookupId="TRUE" /><Value Type="Integer"><UserID /></Value></Eq></Where></Query>
Notice here Valuetype is integer.
Using <UserID /> as the value, the query will filter based on the current user. You can also pass the ID of a specific user in place of <UserID /> (e.g. <Value Type="Integer">283</Value>) if you don’t want to filter by the current user.
Lookup on text
Example
<Query><Where><Eq><FieldRef Name="SomeLookupColumn" /><Value Type="Lookup">GujaratState</Value></Eq></Where></Query>
This will look for items with “GujaratState” in the look up column field. If there are more than one items having same display name, it will return all those items.
Date & Time
Example
<Query><Where><Eq><FieldRef Name="Modified" /><Value Type="DateTime"><Today /></Value></Eq></Where></Query>
A date can also be used instead in Value tag.  We can also use something like this <Today OffsetDays="-4" />

Wednesday, November 11, 2015

SharePoint 2013 : Creating Document Sets




Define the allowed content types. Select from the feature request content types and add each of these documents.
Choose each of the content types to tell SharePoint what should be provisioned when the document set gets created. You may not actually want to use the same template that’s defined on the content type here in the document set. These are the default pieces of content. Remove the default content type that’s just a blank word document.
Shared columns allow me to specify which of the default Meta data could also be created on the documents themselves. Out of the Meta data we created on the document set, I’ll create everything on the welcome page. If we have any content types already based on this one we can make an update. Select yes to do the update. Click ok.

The content type and document set are ready to go. 
1. Go under library settings
2. Enable the use of content types with the management of content types on this library under advanced settings.
3. Click allow the management of content types.
4. Scroll down and click ok.



5. From here add from existing content types. Add from my feature request document sets. Click ok.
Make sure the default word document is not an option when we go to create a document set. Make it invisible by unselecting the checked box under visible. The feature request document set is now the default content for this library. Open the default all documents view and add in the referred by, the request date and the request status, so they appear on the default view.



For more