Skip to main content

Posts

Working with client side relative Url Tokens in SharePoint 2010/2013

Most of the time we are having problems with Getting relative site collection URL in client side Getting relative Layout URL in client side Getting web site URL in client side when we are developing SharePoint applications. (for an example Creating a custom master page and providing links to content inside the SharePoint). If we are working with SharePoint  Standard or Enterprise we can  use < link rel= "stylesheet" type= "text/css" runat= "server" href= "<% $SPUrl:~sitecollection/Style%20Library/mystyle.css %>" /> But to work with SPUrl you need the control to be server control ( runat = server ). Other Possible Url tokens are ~site/ ~sitecollection/    ~language there are few other undocumented Tokens as well . Other than that you can use _spPageContextInfo JavaScript Objet in all SharePoint versions. <script type= "text/javascript" > function goToLink(link) { location.href = _spPageContextInfo.web...

SharePoint 2013 Page Layout Zone Titles and Structure

These zone names are needed when you insert Web Parts programmatically. Header,Footer, 3 Columns Header LeftColumn MiddleColumn RightColumn Footer Full Page, Vertical FullPage Header, Left Column, Body Header LeftColumn Body Header, Right Column, Body Header Body RightColumn Header, Footer, 2 Columns, 4 Rows Header Row1 RightColumn LeftColumn Row2 Row3 Row4 Footer Header, Footer, 4 Columns, Top Rows Header LeftColumn TopRow RightColumn CenterLeftColumn CenterRightColumn Footer Left Column, Header, Footer, Top Row, 3 Columns LeftColumn Header TopRow CenterLeftColumn CenterColumn CenterRightColumn Footer     Right Column, Header, Footer, Top Row, 3 Columns Header RightColumn TopRow CenterLeftColumn CenterColumn CenterRightColumn Footer

MVC4 Session @ SL Air Force

I have hosted a MVC4 introduction and basic development session for Sri Lanka Navy (Head Quarters) behalf of Microsoft Sri Lanka. Audience was pretty good and we had  a more than one our questions and answer session Date : 31 Jul 2013 Attendance : 15 Members

Single Reference JavaScript Pattern for SharePoint 2013 App Development and Web Development (SRJ Pattern by Melick)

I have tried many different ways to properly organized JavaScript in my Developments. When I'm developing I have faced following issues. Each and every place we need to include script files IF one place change we need to change all the pages for references Assume we need to update JQuery  version then we need to change all pages which refers scripts. Thus i thought to work on my pattern with the help of JavaScript Loader to overcome this situation. I have used Head.js to dynamically load JavaScript's. There are few other JavaScript loaders such as RequireJS Head.js ControlJS LABjs I have chosen Head.js because of performance and simplicity you can develop this pattern to work with any JavaScript loader. Head.js supports other css declaration and media queries as well. This pattern can be extended support css loading as well. This is very simple pattern. In here you need to only refer one script in a page and It will take care of loading other scripts for you. S...

SharePoint Status Notifications and Pop Ups SharePoint 2013 Apps

First we need to refer following SharePoint related JavaScript and jQuery <script type= "text/javascript" src= "YourLocation/Scripts/jquery-2.0.1.min.js" ></script> <script type= "text/javascript" src= "/_layouts/15/MicrosoftAjax.js" ></script> <script type= "text/javascript" src= "/_layouts/15/sp.runtime.js" ></script> <script type= "text/javascript" src= "/_layouts/15/sp.js" ></script> After That You can <script language= "javascript" type= "text/javascript" > // This will automatically disappear after some time SP.UI.Notify.addNotification( 'Processing...' , false );   // This will remove after you click or removed by a code SP.UI.Notify.addNotification( 'Processing...' , true );   </script> <script language= "javascript" type= "text/javascript" > // Set th...

Step by Step Approach to Create a Visual Studio SharePoint Workflow (Sequential)

First we need to install and Configure Workflow Manger. You can install it using Web Platform Installer You can find complete guide here ( Prabath’s Blog ).   select the options that you need to run the workflow Manual Item Created Item Changed As a sample WF I’m going to get the “ Age” Column in the item and Write it to log and update a column using a message. Since we need to look the Age Column, i added the LookUpSPListItem to the sequence.  In the LookUpSPListItem you need to set properties to currentitem and currentlist as well as valuable you need to retrieve properties (You can change these on right side property window). Then by clicking get properties VS generates a GetDynamicValueProperties action. In there you need to select the variable as the Source and specify properties you need to retrieve.   Then drag and drop a WriteToHistory Action to the sequence. here you can go to properties and specify the message you need to log to his...

SharePoint 2013 Visual Studio is not going deploying and remain same as previous version.

i created a visual studio workflow and first time successfully deployed it to SharePoint server and it worked fine. But after i modified it; it didn't work.So i found visual studio cashes it in a vssphost5.exe process.      end the process and deployed it again. and it worked :)