Thursday, September 25, 2014

Take Microsoft Exam from home.

Microsoft and Pearson VUE are on a mission together to make our certifications more convenient and accessible from your comfort home of MCP and MTA exams not for all.
Again its only available for US developers and its in beta stage.
I don't think so,this plan yields results for Indian audiences.

Let see how its advancing..!

App model directly ask to Microsoft’s Jeremy Thake!

SPChat with Jeremy Thake: transforming your code' around taking full trust code to app model

Event Details

SPChat with Jeremy Thake: transforming your code' around taking full trust code to app model
Time: September 25, 2014 from 5pm to 6pm
Location: Main Room
Event Type: spchat
Organized By: Vlad Catrinescu
Latest Activity: 1 hour ago

Tuesday, September 23, 2014

SPD Workflow string length

There is no function to work directly in SharePoint designer workflow for trimming the text or string.
You need to tweak the some logic to achieve this.
First create the calculated column (To find the length of particular column )
In formula paste this code

"=IF(LEN(Description) >10,"OK","No")"
So your calculated column will result either OK or No,
Compare this value in the SPD Workflow, as your requirement use the "Action"
"Extract Sub string from start of the string" and store the trimmed text in the workflow variable and update the item.



And the workflow result on the Item.


Sunday, September 21, 2014

Desktop experience - infopath form publishing


When you are working on your Windows 2008 R2 server and trying to publish the InfoPath  form, you might get the below error.

"InfoPath cannot save the following form" error message when you try to publish an InfoPath form on a SharePoint Server 2013 server".

To overcome this problem,You need to activate the "Desktop Experience" in your Windows 2008 R2 server.
Start->Administrative tools-> Server Manager ->Under Feature Summary. "Click to Add Features"
and Select the Desktop Experience and restart the server.

If you are not restart your server after activating the Desktop experience features then your infopath form shows in read-only mode.

Wednesday, September 17, 2014

The local SharePoint server is not available Visual Studio error

When you are working on the same server with different user context while developing the SharePoint application using Visual Studio you might encounter this error.



Error occurred in deployment step 'Recycle IIS Application Pool': The local SharePoint server is not available. Check that the server is running and connected to the SharePoint farm.

This error explanatory is not as exactly described. Still you are sure you have the permission on the site where you are trying to deploy the Farm / Sandbox Solution and even you are the member of SharePoint Farm administrator.



The reason for this exception is the currently logged in user doesn't have permission to access the Content database of the web application.



To resolve this issue, giving the db_owner permission role to the currently logged in user content database.

Querying the SPList Items - best practices

Its time to recollect and replenish my knowledge on basic operation in SharePoint Server Object model coding to write the optimized code.
Especially on querying the List Items in SharePoint List.

Loading the specific list in the memory instead of loading all the list and their meta data available in the SPWeb object in the memory

var list = webObj.GetList(SPContext.Current.Site.Url+"/Lists/ListName/AllItems.aspx");

Secondly,
Loop through all list items through the Items Count property of the SPListItemCollection class.
I feel its good to work with individual item instead of loading all items using RowsLimit in SPQuery class.

example

 using (SPSite site = new SPSite(SPContext.Current.Site.Url))
            {
                using (SPWeb web = site.OpenWeb())
                {
                    SPList list = web.GetList(web.Url + "/Lists/Friends/AllItems.aspx");
                    SPListItemCollection cols = list.Items;
                    for (int x = 0; x < cols.Count; x++)
                    {
                        //Loading the specific items in the memory instead of loading all items.
                        SPListItem item = list.Items[x];

                    }
                }
            }





Friday, September 12, 2014

Sign in as different user

Sign in as different user in SharePoint 2013 can be doable even if your browser setting that allows you to accept "automatic log on with current user name and password.


Its often required for developers as they wanted to test the application or SharePoint site with different user context.
It can be done in two ways,
1,Hold the Shift Key and Right click on your Internet explorer menu in the start up menu.
2,Go to "http://siteurl/_layouts/closeConnection.aspx?loginasanotheruser=true"






Wednesday, September 10, 2014

Improving SharePoint Site performance

If you site in SharePoint 2013 or Office 365 experiencing the performance problem,There are multiple ways to analyse and diagnostic.

Some of the important ways to improve the SharePoint site performance.


  1. You can enable the developer dash board (on premise) to identify the problem.
  2. Log and Event Viewer (on premise)
  3. You can enable the Page Output Cache if you are working on customizations.
  4. Device Channel Management.
  5. Minimal Download Strategy (MDS - my personal opinion, this will works better conjunction with Page Output Cache ).
  6. Running the Site Collection Health Check report is the best option to identify the bottle necks, It will reports you in problem persisted with Content type conflicting,missing parent content type,missing site template,missing galleries, unsupported MUI references (If you enable Multiple Language support feature) and issues in your custom master page and Page Layouts.

If you are running the CSOM code against your SPO site,monitor your site performance very often.

To run the Site collection health check,
Gear Menu -> Site Settings -> Site Collection health Check -> Run.