Tuesday, March 17, 2009

Customise SharePoint List forms – Part 2

In Part 1, I walkthrough modifying the display form of the list by adding headers. This was achieved using SharePoint Designer.  This is easy to do on development machine but how would you do this on Test or Production environment. You would not be able to connect to this environment using a developer tool. If you are in your organization, please avoid as this is not good practice. Opening pages using SharePoint designer would un-ghost your custom pages (add to database). If you install the changed pages using SharePoint solution, your application would read from database and not from file system.

To deploy a custom dispform to the production environment, you need to create a WSP package.

Steps:

1.      Create List Instance Schema:

The best tool which REALLY does a job is Imtech StsAdm Commands. Download it from http://www.codeplex.com/imtech/Release/ProjectReleases.aspx?ReleaseId=10875

2.      Install Imtech STSAdm package to your development server

3.      The command sytax is

stsadm.exe -o ocdexportlist

           -url <url of the site containing the list>

           -name <list name>

           -dir <export location>

 

This action exports the definition of a list with the given Name

Example:

stsadm.exe -o ocdexportlist -url http://sharepoint –name Employee -dir C:\EmployeeList\

 

 

4.      Run the command changing the text in red according to your environment

5.      This would generate following files –

 

Schema.xml

The XML which describes the list instance

DispForm.aspx

Display form based on the List

NewForm.aspx

New form based on the List

EditForm.aspx

Edit form based on the List

AllItems.aspx

Form which displays the default view(All Items)

 

6.      Create Elements.xml and Feature.xml files(Check Microsoft site for creating them).They are simple XML file which contains the feature information

7.      Create a SharePoint Package and add the files to the project

8.      Build the solution and deploy on production site. You should now have a list called Employee and having headers in Display form for the item.

 

Customise SharePoint List forms – Part 1

I have been asked several times to modify the list forms-  DispForm.aspx, NewForm.aspx and EditForm.aspx. As these forms are associated with list and stored in database, you can’t edit these phase from UI. 

The best way is to create the list in development environment and open the web pages using SharePoint Designer. 

In this tutorial, I would walkthrough to add Headers to the sections.  We are having an employee list whose fields need to be group under Personal and Company Headers

Walkthrough:

1.      Create a custom list called Employee

2.      Add Text Fields for Personal Details – Employee Name, Address, City, Country

3.      Add Text Fields for Company Details – Company Name, Company Country

4.      The list should show like the below figure

Firstimage

 

 5.      Click on New button on the Employee list to create new record

image

6.      Enter details and press OK

7.      Click on Employee Name to view the details. You would see that there is no grouping and no option to Edit the page 

imageimage

 

8.      Open SharePoint designer and browse to the list

image

 

9.      Click on “DispForm.aspx” to view it in the designer

image

 

10.   Select the Main Content holder and press delete. This will remove the existing ListFormWebpart

11.   Now, insert a custom list form from menu. Go to Insert -> Sharepoint Controls -> Custom List Form

12.   In popup, select Display form and press OK. You should have the page changed to something like below

image

 

13.   As Custom List form displays the field in a HTML table, you are free to modify the HTML. You could insert your custom or OOB web parts now to the page.

14.   Make appropriate change and save the form. This would save the form into the database and the changes would be reflected in the UI

image

 



You now have a custom list form with headers :-)

Commonwealth Bank of Australia Login Button Missing


Last week, I was informed by Commonwealth Bank of Australia that they would be changing the look and feel for their Net banking screen. I thought that great as they should be making it more users friendly. On weekend, I went to check the page and login to the site. Unfortunately, I was unable to login into site as they forgot to put the Logon button. Yes, there was no logon button. I called help desk and was told yes some of browser have this issues. You can't use enter button as its trapped using JavaScript and you are prompt for that. Finally, I tried using it was Firefox and there you go. It worked....
So, someone forgot to test the site on Internet Explorer as if that not the most common used browser 
I dig more and found that there was in fact a logon button which was not visible on IE. You could go to this using tab and will find a hidden box selected. Clicking on that took me inside the net banking.
A nice workaround :-). I think CBA would focus more on user ability testing from next time

Wednesday, January 28, 2009

The Study Guide for Technical Specialist: MOSS 2007 – Application Development Exam (70-542)

 

Passing this exam would earn you MCTS: SharePoint Server 2007 ― Application Development certification. If you are a Microsoft Certified Technology Specialist (MCTS), you not only thrive on the continuing challenges of the information technology (IT) field, but you also take the initiative to develop and hone your skills so that you stay a step ahead. When you become Microsoft certified, you will:

• Stand out. Prove your specific, real-world technology skills.

• Be productive. Help increase customer satisfaction, reduce network downtime, and push service to a higher level.

• Achieve success. Each Microsoft certification takes you further along the path to professional recognition.

The Microsoft Certified Technology Specialist: Microsoft Office SharePoint Server 2007 – Application Development certification highlights your area of expertise and validates the knowledge and skills required to build Web portals and integrate business applications by using Office SharePoint Server 2007. A successful candidate will have prior experience working with XML, the Microsoft .NET Framework, and Microsoft Windows SharePoint Services development

The process to become is very simple. Once you have done all the preparation and confident to pass this exam, you need to enrol for the exam at Prometric

Who should apply?
Candidates for this exam are consultants who provide consulting services for Microsoft Office SharePoint Server 2007 and corporate developers who use Microsoft Office SharePoint Server 2007. Candidates have the following experience or knowledge:

·        Six months to one year of experience developing applications by using Microsoft Office SharePoint Server 2007

·        Experience using the following related technologies:

1.    The Microsoft .NET Framework at least six months with ASP.NET 2.0)

2.    Windows SharePoint Services development (six months to one year)

·        Experience working with XML documents

·        Experience with XML Web services development and consumption

·        Working knowledge of Windows Workflow Foundation

·        Working knowledge of IIS 6

 

Log into Promteric site and browse to Microsoft -> 70-542. Now, select the testing centre close to your location and book a suitable time. Do the payment.  It is pretty much the same thing afterwards about rescheduling etc.  Rescheduling notice time is one business day.

Once you book a spot with Prometric, you will receive an email from Prometric about the confirmation of the exam spot on a given date and time.  Prepare your best for the exam and go to the examination centre on a scheduled date and time.  They do pretty much the standard identification check (one with your photo and other with your signature) and allow you to sit an exam. The exam itself consists, almost entirely, of multiple choice questions. You will usually be required to select one answer from a possible four (using radio buttons), in some instances you may be asked to select two answers (using a selection items/tick boxes), and in at least one case you will have to drag and drop possible answers from the left side of the screen to the right in the correct order. The exam currently consists of about 32 questions, and you need to get about 70% correct to pass.

At the end of the exam, you will get the final result – % Scored. If you pass (and I am sure you will) then relax for few moments as you have achieved a very demanding certification.  Then celebrate as it’s time to party after such hard-work.

 

There are different approaches being taken by different people doing the same task.  I completely understand that you may follow different approach to get your certification.  Regardless of your expertise with SharePoint, allocate yourself a good amount of time to study. This exam covers most of MOSS functionality and as such you’ll need to brush up on allot of skills, so make sure you have the hours free!

This section mainly shows the study path that as per me should get you pass this exam.

Topic

Description

Resource

Document Policies

Study up on custom document policies, what they are, when you need them, and how to create them e.g.:

Public class DocPolicy : IPolicyFeature

http://www.sharepointblogs.com/tonstegeman/archive/2007/02/01/moss-custom-policies-part-1-creating-a-custom-information-management-policy.aspx

Content Deployment

If you have done this before or used STSADM, you should be fine

http://blogs.msdn.com/jackiebo/archive/2007/02/26/content-deployment-step-by-step-tutorial.aspx

Custom Field Controls

Learn what you can inherit a custom field control from and why

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

Excel Services

Learn about this new technology that enables you to load, calculate, and display Excel workbooks on Office SharePoint Server 2007

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

 

Variations Feature

 

http://aspnetcoe.wordpress.com/2007/02/09/customize-variation-root-landing-logic/

Business Data Catalogues

Yes, they come up extensively. Pay particular attention to the XML and know how to define entity vs methods. Make sure you know the difference between a Finder and Specific Finder method.

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

http://blah.winsmarts.com/2007-4-SharePoint_2007__BDC_-_The_Business_Data_Catalog.aspx

Single Sign-On (SSO)

Should be part of BDC

http://www.sharepointblogs.com/michael/archive/2007/07/30/using-the-business-data-catalog-with-single-sign-on.aspx

InfoPath forms

Pay special attention to what you need to do to get the form to display on an ASP page. Where does the XSN/XML file get added and so on?

http://msdn.microsoft.com/en-gb/magazine/cc163562.aspx

 

User Profiles

Read up on the API ensure you know what the code looks like, because you will be looking at code snippits in this exam

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

 

Search

Lots on this, but mostly related to BDC Definitions as far as I recall. Make sure you are familiar with the kind of XML that can be edited for the Search Core results page. What kind of fields are there.

Refer the book in next section

Audiences

Pay careful attention to the API and learn the basics of the AudienceManager and what you can do with it

http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.portal.audience.audiencemanager.aspx

 

 

Personally, it was bit easier for me on User Profile, Audience, Search and BDC as I have used them extensively in my last project. I would surely advice anyone taking this test to write some code on User Profile and audience targeting.

 

Inside Microsoft® Office SharePoint® Server 2007

Author :      Patrick Tisseghem    

Language :      English 

In my opinion, no study can be termed as complete without going through the book.  I bought this book one year ago while preparing for MOSS 2007 Configuration exam. This has really been helpful in passing in the exams. This book provides great overview of all the functionality of MOSS specially Search. I highly recommend it. 

This book provides:

·        Build collaboration and publishing portals for your intranet and extranet

·        Customize and brand your site with master pages, CSS, and navigation options

·        Programmatically support search administration and execute search queries

·        Create scripts to customize the provisioning flow of your portal

·        Use the Business Data Catalog to integrate collaborative workspaces with line-of-business applications

·        Add browser-based form capabilities with InfoPath Forms Services

·        Develop Web-based business intelligence solutions using Excel Services

·        Apply policy and document routing frameworks to help enforce information management rules

Friday, October 03, 2008

IsInteger Function in C#

        public bool IsInteger(string strNumber)
        {
            Regex objNotIntPattern = new Regex("[^0-9-]");
            Regex objIntPattern = new Regex("^-[0-9]+$|^[0-9]+$");
            return !objNotIntPattern.IsMatch(strNumber) &&
                    objIntPattern.IsMatch(strNumber);
        }

Wednesday, September 03, 2008

Access is denied. Check that the Default Content Access Account has access to this content

This is one of most common issue reported by people on the internet. I also came across this issue and able to solve after doing deep dive into MOSS search.
If you are facing this issue, look for following:

1. Check default content account have read permission to the site. Go to Central Admin-> Application Management -> Policy for web application. Confirm that the default content account have full read permission to the web application

2. Try changing the host file to crawl the local server to eliminate network issues. This is just for testing and should not be done in live environment

3. Make sure none of Web front end server have spaces in their custom headers. Seems crawler don't like spaces in custom headers

4. Finally, this took us a weekend to note. Someone removed the following site permissions "Use Remote Interfaces" and "Use Client Integration Features" to stop developer to connect to MOSS site using SharePoint Designer. This BROKE THE SEARCH CRAWL. So, make sure for your application these permission are enabled. Go to Central Admin-> Application Management -> User Permissions for Web Application to verify this.