Sunday, December 16, 2012

Download latest InfoPath form templates

"Change is inevitable", and it is true to InfoPath forms as well. Quite often the client asks you to make changes to the InfoPath forms and you may not have the original files.

Perhaps the files you have in your network location are outdated and old and have been gone through many update iterations.

You can download the latest form by navigating to the following path:

http://<domain>/FormServerTemplates/FormTemplate.xsn

Select the Form and click Save As or Download a copy

Note: The URL path may be different for you depending on your SharePoint Site hierarchy.

Sunday, December 9, 2012

SPD Workflow error: Path needs to point to valid member

I had created a workflow and its always interesting to make few changes to it, or is it? It is not so welcoming though, but when you have a client instruction, you welcome it with a smile.

So here I was updating/editing the workflow. After updating it when I clicked Finish (this will associates the workflow to a SharePoint List), I received an error as below.

I haven't found any reference on the web or workaround for this issue.

(0, 0) Activity 'ID9355' validation failed: Path '_x005f_String135' used to specify member for 'ROOT' is invalid. Path needs to point to valid member.
(0, 0) Activity 'ID9325' validation failed: Path '_x005f_String136' used to specify member for 'ROOT' is invalid. Path needs to point to valid member.

I realized I had backed up the workflow before making any changes to it. So I opened the copy in Notepad (.xoml file) and was trying to trace the String '_x005f_String135' and '_x005f_String136' as in the above error.

I found that this string was referenced couple of times in the document. I then started comparing both the workflows (the one I was editing and the backed up copy).

Found that a statement like below were missing in the copy I was editing:

<ns0:WorkflowDataField Name="_x005f_String135" Type="System.String" />
<ns0:WorkflowDataField Name="_x005f_String136" Type="System.String" />

I believe this to be a declaration of strings used in the workflow which apparently went missing when I was updating the workflow. I have no idea why did this happen.

So I copied this part from the backup and pasted in the file I was editing. I then saved the .xoml file, opened the workflow and clicked Finish (to associate with SharePoint List.)

It worked!

Lesson Learnt, or rather an Affirmation to myself - Continue backing up often.

Tuesday, December 4, 2012

Unable to add Active Directory group in SharePoint

SharePoint Users are usually Active Directory Users when using SharePoint in intranet. A strange thing I came across was I was able to add individual AD users in SharePoint but when I was trying to add an AD group, it said "No exact match found." Even though the AD group is present in the domain's active directory.


  •  Now to resolve this issue, browse to the Active Directory and right click the group to open it's properties.
  • On the General tab, find the section Group Type.
  • If it is set to Distribution, change that to Security.
  • Now you should be able to add the AD group into SharePoint.
For details regarding Group Types, refer Microsoft TechNet Site here.

In brief:

Distribution Group
This is used only with e-mail applications (like Exchange) to send e-mails to a group. This is not security enabled.

Security Group
To give an AD group controlling access to shared resources, you need to use Security Groups. A concept called discretionary access control lists (DACLs)

Hope this helped!

Screenshot on HTC Chacha

Red button (Call End button) + Home button (on the screen)

Did you get it?

Monday, November 26, 2012

You updated the workflow, but the changes haven't taken effect

I know how frustrating this can get, I have been there.

I changed the workflow using SharePoint Designer 2007 and published it, but when I test the workflow on SharePoint 2007, it seems to have not been effected by those changes.

Seems like the SPD workflow cache is being superior. Here is how you go about resolving:

  • Close the designer (SharePoint Designer)
  • Navigate to %system drive%\Documents and Settings\%user%\Local Settings\Application Data\Microsoft\WebSiteCache
  • Open the directory that you are referring to. This is similar to the name of your website.
  • Delete the assembly that you were changing. (You might as well delete all the files here)
  • Open SharePoint Designer, publish the workflow and check

Sunday, November 4, 2012

The web application at [URL] could not be found

Here is an error I encountered while calling the SPSite object using the URL:

The Web application at [URL] could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application.

It was the first time I encountered this and this is how I moved about resolving the issue

1. Checked if the URL was really not available.

That wasn't the case. The URL was very much valid and hence this option got eliminated.

2. Google search on this issue almost always pointed to the bit-ness of the platform. That the application was targeting x86 platform and SharePoint Server was x64 bit platform.

In my case, this wasn't true either. Both my platforms were on x86. It was easy to eliminate this option.

3. AAM, Alternate Access Mapping not done properly.

Wasn't an issue in my case. Any guesses? This option was eliminated as well.

4. The code is a windows or web service application which you are running with an account that does not have permissions to connect to SharePoint or SQL Server.

This is where I was at and out of it. This was the issue in my case. My web service code was running on the DefaultAppPool and the identity for the DefaultAppPool was Network Service Account.

I selected configurable and provided the username and password of a user who had elevated privileges.

It all worked and I hope it does for you as well!

Wednesday, October 24, 2012

How to fix: "List does not Exist" error

Stepping into the SharePoint world, I pretty early understood few of the famous SharePoint errors and one of them is this.

"List Does not Exist.
The page you selected contains a list that does not exist. It may have been deleted by another user."

There are plenty of solution offerings when you search this issue online, but one that worked for me was that the user did not have access to the form template library at http://<url>/FormServerTemplates

"Go to the above URL > Settings > Library Settings > Permission to this Library" and provide permission to your user.

It all works!

PS: The error message might sometimes be deceiving, don't be deceived. Mostly, it has nothing to do with a deleted list. It was just an access issue. Stay focused! :)

Monday, October 15, 2012

In less than 140 characters

This post contains many SharePoint Tidbits.

MOSS 2007 - Save Site as Template missing?

Append your site / sub site's URL with /_layouts/savetmpl.aspx
For example - Replace http://moss:101/default.aspx with http://moss:101/_layouts/savetmpl.aspx

Sunday, October 7, 2012

Why are InfoPath rules not triggering?

Customizing InfoPath at one of my client bought me to a challenge. Now, though challenge sounds a biggie, it wasn't really the case. In a moment, you'll know why!

I wanted to populate few text fields on the selection of a Dropdown list. I created a web service and connected it to InfoPath via InfoPath data connections. This would fetch data based on the dropdown selection and populate the fields.

But it wasn't the case. The fields weren't being populated!

I published and checked the web service separately and it was returning perfect as expected. I repeatedly checked the InfoPath form rules and they were fine too.

Now, if you are new to InfoPath customization (like I am), you should be convinced that you are missing something somewhere.

Looking around I navigated to the Dropdown list properties > Browser Forms > Postback Settings. This was set to Never. I changed it to On Demand and .......

Ah ha!

Biggie? I told you, you'll know why not :)

Monday, September 10, 2012

Don't see Save as Site Template

I wanted to migrate my site from one SharePoint Site Collection to another. And I thought to save the site as a template and upload the template to the new Site Collection and Activate it. But when I navigated to the Site Settings page of the site I wanted to save as template, I din't find the link.
Under Site Actions


This post is limited to making Save as site template available here and not how to Export and Import the template.

Steps to enable Save as site template

  • Click on Manage Site features under Site Actions.
  • Click Deactivate on SharePoint Server Publishing feature.
  • Click Deactivate this feature on the page that opens.
  • Navigate back to Site Settings page for that site and under Site Actions you will now see Save as site template.
Picture speaks a thousand words: I should have done this before the write up :)

save as site template unavailable: sharepoint 2010

deactivate sharepoint server publishing


save as site template available


Sunday, July 8, 2012

Issue Resolution Journey during SharePoint 2010 Installation on Windows 7

While Installing SharePoint Foundation 2010, I encountered a failed installation error and it pointed me out to go through the log files.

While having a look at the log files, I landed on a file at this location C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\Summary.txt

When I scrolled towards the end of the file, the below InnerException was displayed.


Inner exception type: Microsoft.SqlServer.Configuration.SqlEngine.ValidationException
        Message: 
                The system database file master.mdf already exists in C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Data\MSSQL10.SHAREPOINT\MSSQL\DATA.



Towards resolving the issue, I renamed this file -> un-installed SharePoint Foundation 2010 and tried installing again. This time I hit another error quite similar to the above but with one exception, "the file name this time was master.ldf"

Inner exception type: Microsoft.SqlServer.Configuration.SqlEngine.ValidationException
        Message: 
                The system database file master.ldf already exists in C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Data\MSSQL10.SHAREPOINT\MSSQL\DATA.

By this I understood that it would do this for all the other system databases available in this folder.

I went one folder up to ..\MSSQL and renamed the folder DATA -> un-installed SharePoint Foundation 2010 and re-installed again. Guess what ....... I was in smiles.

SharePoint created another folder called DATA and created the database and log files a-fresh again.

Quite straight forward, but worth taking a space on my blog. Hope it helps!!

Tuesday, May 1, 2012

Excel VB commands to Convert Numbers into Currency

In the below example we are converting a Number to Currency and we are using '$' symbol for display.


We can achieve this using alternate commands like the ones in the below example. However, the above command is a short-hand. Quite handy, ain't it?


Output after converting to INR
We can also change the currency. Suppose we were to display INR (Indian Rupees)




To learn about formatting numbers in Office Excel (the ones like #.##, #,###.00 etc. that you see in the above examples), I would recommend you to refer Excel Help and search for the topic "Create or delete a custom number format"

Sunday, April 22, 2012

SharePoint 2010 Products and Configuration Wizard Error

Operating System : Windows Server 2008 R2 (all important updates installed)
Installing : SharePoint Foundation 2010 Standalone (with SQL Server 2008 Express SP1) in one box.

Steps successfully performed:
  • I installed all pre-requisites using SharePointFoundation.exe
  • I restarted the Server
  • While running SharePoint 2010 Products and Configuration Wizard, I received the following errors

After resolving the above error I received


Here is the right approach
  • Before running ShaerPoint 2010 Products and Configuration Wizard, Right-click on the folder %commonprogramfiles%\Microsoft Shared\Web Server Extensions\14 click Properties from the context menu and then select the Security tab > select Edit
  • On the Permissions for 14 dialog click Add… and enter Network Service in the Enter the object names to select and then click OK.
  • On the Permissions for 14 dialog select Full Control under Permissions for NETWORK SERVICE and click OK twice.
The second screenshot above is faced when you don't have the Cumulative Update 2 installed for SQL Server 2008 Express. Download and Install SQL Server 2008 KB 970315 x64

Site Collection Features Not Visible - SharePoint 2010

Trying to spot "Site Collection Features" in your SharePoint Site and unable to find it? Here is how you approach it:
  • Open Central Administration
  • Select Application Management
  • Click Change Site Collection Administrators
  • Add yourself as the Administrator (Primary or Secondary)
  • Get back to your Site and refresh the page.
I am sure you are good to go :)

Cannot find Enterprise Search Center when creating a New Site

There could be two reasons for this:
  • SharePoint Server Standard Site Collection Features is deactivated.
  • Enterprise Search Center is not available under Sub sites can only use the following site templates in Page Layouts and Site Templates under Look and Feel.

Activating SharePoint Server Standard Site Collection Features

  • Click Site Actions > Site Settings > Site Collection Administration > Site Collection Features (Can't find Site Collection Administration? Look here)
  • Activate - SharePoint Server Standard Site Collection Features
Enterprise Search Center should be visible under Site Action > New Site. If not, keep reading :)

Provide Privilege to use Enterprise Search Center

  • Click Site Actions > Site Settings > Look and Feel > Page Layouts and Site Templates and add Enterprise Search Center (All) to the right (as shown below)
  • Click Ok.

Tuesday, April 10, 2012

Override Inherited CSS

If you've been a web designer for long, you already know that there are ways you can override your CSS. You have done it before, may be many times before, but something still isn't working. Because it didn't for me. Now I am not saying those methods are incorrect. They might just not apply to your situation, like it didn't on mine!

I had a global CSS file and was inherited on all pages on my site. My page was divided into two parts, left and main body and I had a page where in I did not want the left part. So I needed to centralize my main body. My LEFT-NAV and ARTICLE-MAIN were adjusted using margins as shown in the below CSS
Image 1 - Left Navigation and Main Article

This is my global CSS


This is the part of my page that needed adjustment

Since I was working with SharePoint, I did not have lot of flexibility in terms of designing (because it has many dependent and moving parts). So this is what I did :

Image 2 - Main Article only
I negated the margin and I could get the ARTICLE-MAIN centralized. Again this might not be the solution to your situation, but it worked for me. This might also interest you # CSS Overriding styles

Sunday, April 8, 2012

SQL Server - List All Tables in Database

This can be achieved easily using the below command


Now what is xtype ?
It identifies the type of objects stored in your database. The codes mean :

  • U - User Tables
  • P - Stored Procedures
  • V - Views
  • S - System Tables
I recommend you have a look at 'Understanding SQL Server's sysobjects table' for further knowledge.

Monday, April 2, 2012

Change Browser Tab Title in SharePoint

Check the Page Layout you are using for your site.

Open the Page Layout in SharePoint Designer in Advanced mode. Page layouts > Right click Page Layout > Check Out > Right Click Page Layout > Edit in Advanced Mode.

Find the code snippet and replace the text "your title here" with your title.