Pages

Sunday, November 17, 2013

Setting up Welcome Page for a SharePoint Site

Some SharePoint objects needs an instance to work perfectly, and below line of code will not work:-
 SPSite site = new SPSite("http://a2zdinesh:1010/sites/InternetSite/");
SPWeb web = site.OpenWeb();
web.RootFolder.WelcomePage=”SitePages/Dashboard.aspx”;
web.RootFolder.Update(); 

After trying hard came to know that with above way we cannot set the Welcome page for a non-publishing site. Exact reason is not well kept in any MSDN and to set we need to use the SPFolder Object. Below is the sample code of it,

SPSite site = new SPSite("http://a2zdinesh:1010/sites/InternetSite/");
SPWeb web = site.OpenWeb();
SPFolder folder = web.RootFolder;
folder.WelcomePage = "SitePages/Dashboard.aspx";
folder.Update();

Will post you if I get any..:-) 
 

Sunday, November 3, 2013

KPI's in WSS/SharePoint Foundation using Dataview Webpart

Business Problem:-
A Small or Medium Scale industries who can't afford to buy the MOSS 2007 or SP 2010/2013, and having the environment of WSS [Any version] or SharePoint Foundation [Which is very low Cost] requires the Key Performance Indicators or the better Look and feel or the specified functionality.

Technical Issue:-

If the users use the MOSS 2007 or SP 2010/2013, the above problem is solved with OOB features. If he wants on WSS [Any Version] or on SharePoint foundation, we will be not having the Content Query webpart or KPI Webparts. Then we can solve the issue by introducing the Data view Webpart. [With Workaround on this OOB Webpart]

Steps to follow:-
1. Create a New Page in the SharePoint Designer.

2. Click on Insert -> SharePoint Controls -> Data View as shown below.
3. After placing it, you will observe as below, where the Webpart Zone will be placed in Page and in the right section you can see the Data Source Library

 

4. Now select the required Data Source like list or library etc., Let us suppose select One List like below screen.
                                           

5. After selecting List you will get the Data Source Details as below. Select the required fields to view and click on the Insert Selected Fields -> Mulitple Item View
                     

6. You will observe the below screen, where in the code you can see the XSL Stylesheet. Hope now you all got my next steps if you are aware of devleoping Content Query Webpart with XSL Styling.


Create KPIs
7. Now it’s time to create some fancy indicators to show if goal is reached. To do so you will need to open your page in SharePoint designer code view.

8. Add an additional th tag. It will create one additional column to display our KPI status icon.

9. Now we will need to add actual code to display the image. Look for the following code:


10. The code above displays the value of the Value column of our list. Paste the following code below it.
<td class="ms-vb">
<img alt="KPI Status Icon">
<xsl:attribute name="src">
<xsl:choose>
<xsl:when test="number(@Forecast_x0020_Cost) &lt; number(@Cost)">/_layouts/images/statusAmber.png</xsl:when>
<xsl:otherwise>/_layouts/images/statusRed.png</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</img>
</td>
Here in the above code place required logic.

11. You will observe as below. [Don’t get confused as below is one which I added two Columns as Indicators]
 

12. Now browse the Page.

SPMetal - SharePoint 2010 & 2013

As we know SP 2010 has introduced a way where we will now be able to implement OOPS principles for SharePoint Code. In other words we can now have an easier way to understand and implement object oriented principles in SharePoint. The short answer on how to do this is - LINQ + SPMetal tool.
I recently started using SPMetal and was amazed how easily I abstracted the logic and got design time checking of web, list schemas, content types, etc.

Overview :- http://msdn.microsoft.com/en-us/library/ee538255.aspx

How to use of SPMetal:- http://msdn.microsoft.com/en-us/library/ee538587.aspx

With Screenshots of SPMetal with External List:- http://fabiangwilliams.wordpress.com/2010/01/03/how-to-using-spmetal-utility-in-sharepoint-2010-to-presumably-manipulate-data-on-a-bcs-external-list/

Sample from Codeplex:-  http://linqtosharepoint.codeplex.com/wikipage?title=SpMetal&referringTitle=Home

Saturday, November 2, 2013

Research Work on Existing Mobile Banking Products

My Professor used to think about me as A VERY GOOD BOY because I used to take books to the class when none attended his class. But he never knew the fact that in the book I used to have a photo of my girlfriend and the reason to attend the class was to have a chance to flirt with her.

I wouldn't blame my Dad for spoiling me by buying me a Mobile. With the arrival of a mobile, my attendance started to decline and thanks for the Providers who given attractive offers. Then my love started towards Mobile too where it went lot of sleepless nights of what it is doing and what it can be done. As I entered my career into Banking Sector Company added more brainstorms and clear picture of Mobile Banking Area.  

Even though my lovely things are filled into my Mobile, I am still having hard time with filling up my Pockets with Money Purse & Cards Pouch. Even some place it made already replacing Money Purse with only Card Pouch but I say that its not TOTALLY. Then the way of thinking went in finding the thing which replaces all into One or else even nothing should be.

Of course as of now I got an idea of replacing the Three Money purse, Cards Pouch & Mobile into One. That is Mobile itself. Let me tell clearly how it will be and What it all can do.

Already in the Market there are many Cellphone Banking Products and Money Transfer Services, where initially I thought no such exists in the market.
  • M-PESA                     
  • SharPay -
                    http://www.youtube.com/watch?v=wV7fd6ioG7M
  • WIZZIT
  • YUCASH
  • ZAP
Hope you all got many doubts right from Security ,Speed etc., I too accept with you but to be say once more in Simple words NOTHING IS IMPOSSIBLE. Especially the Aggressive TEAM works..I tried best to take some info through Web and Personal Interaction with Leaders in the Market and framed a few roles and respective Queries...!!

CIO's Clarifications
What would be the RoI? What about confidentiality of data? These are obvious questions management would ask a CIO trying to implement mobile applications. Adopting any mobile application is an expense, with no assurance of direct returns. E.g., customers may use a bank's short code toll free but the bank has to pay the application providers and the operators.

Of course, returns are in the shape of better customer focus. If customers get better service they remains loyal and brings in more business. It becomes a great tool in acquiring new customers and retaining old ones.

In the B2B space it gives employees flexibility in business execution and makes the whole process efficient and reduces the turnaround time. Employees have everything on the mobile and don't have to rush to the office for data or consultations before closing deals. Such application gives obvious competitive advantages.

Overall, workforce and IT infrastructure is optimally utilized, which in the long run reflects in the company's balance sheet.