Skip to main content

Posts

Showing posts from March, 2013

Can not connect to Windows Azure Cloud Service Web Role (Remote Desktop)

I have tried few days to connect to azure web role. I enabled the settings which is prompting when you going to publish the web role. But it didn't work for me. (The reason i found is i gave the name administrator ). You can following alternative way to connect to your  web role. How to connect to Windows Azure Web Role (Using Remote Desktop) Create a Azure Web Role and publish it to azure. When you are publishing enable the Remote Desktop for all roles. If you use usernames such as admin, administrator, etc. it will not work. You can check it from Go to Cloud services and Configure Menu Then click the remote icon in the bottom Then it will pop up a dialog which you can use and check for your remote configurations.

Break Permission inheritance and add custom permission to SharePoint 2013 List using JSOM (JavaScript Client Object Model)

First you need to refer relevant JavaScript files. <script type= "text/javascript" src= "../Scripts/jquery-1.7.1.min.js" ></script> <script type= "text/ecmascript" src= "/_layouts/SP.core.debug.js" /> <script type= "text/ecmascript" src= "/_layouts/SP.runtime.debug.js" /> <script type= "text/ecmascript" src= "/_layouts/SP.debug.js" /> Then approach is Get reference to current clientcontext get web site reference get reference to existing list break the inheritance define a role get the user finally add user and related role to the list <script type= "text/ecmascript" > function CustomPermision() { var clientContext = new SP.ClientContext.get_current(); var oWebsite = clientContext.get_web(); // provide the list name oList = clientContext.get_web().get_lists().getByTitle( 'ListName' ); oList.breakRol...

Add Fields to SharePoint 2013 List Using JSOM (ECMAScript Client Object Model)

Other Related Posts Creating a List In My previous post i described how to add a list to SharePoint. In here I'm going to  describe how to add fields to existing list.  First you need to refer same JavaScript files in your script page ( SP.core.js,SP.runtime.js,SP.js )  There are few approaches that you can use to add fields to existing list. But in my personal opinion i like following approach because It is easy rather that use XML to add entire field Intelligence are support based on field type (text, choice, user ..) Code is more readable than xml <script type= "text/ecmascript" > function addFields() { var clientContext = new SP.ClientContext.get_current(); var oWebsite = clientContext.get_web(); //Geting reference to the list oList = clientContext.get_web().get_lists().getByTitle( 'CustomList' ); // Get filed collection var fldCollection = oList.get_fields(); va...

Create a SharePoint 2013 List Using JSOM (ECMAScript Client Object Model)

JSOM (JavaScript client object model) heavily used in SharePoint App model. I'm going to post series of basic operations that can archive using jsom. First add these references to your page. //Add jquery version correctly <script type= "text/javascript" src= "../Scripts/jquery-1.7.1.min.js" ></script> <script type= "text/javascript" src= "https://ajax.aspnetcdn.com/ajax/4.0/1/MicrosoftAjax.js" ></script> <script type= "text/javascript" src= "/_layouts/15/init.js" ></script> <script type= "text/javascript" src= "/_layouts/15/sp.runtime.js" ></script> <script type= "text/javascript" src= "/_layouts/15/sp.js" ></script> Then add following script to create the list. <script type= "text/ecmascript" > function createList() { var clientContext = new SP.ClientContext.get_current(); ...