Tuesday, October 7, 2008

Adding "Contact Us" to a SharePoint site

Whether you are hosting a WSS support site, or a publishing eCommerce site hosted with MOSS WCM, a lot of times you will find the need to allow your users to contact you using a simple "Contact us" form.

Well, this cannot be more simple in SharePoint.

This is how it is done with no development at all:

Create a list named Contact Us with fields: Subject, Body, To.

the To field - can be a user field or a choice field.

If it is a choice field (like: sales / support / partnersprogram etc...) you can do a WorkFlow using SharePoint Designer workflow wizard that sends the email to the manager / mailbox address of that subject.

If it is a user field - you create a view called: MyEmails - and set the filter to show items where To=[Me], so every user gets his "emails". Then you set up alerts to all users for new items in that view so they would get an email whenever a new item was created. (or you can do the WF solution as well).

Simple, Free and Out of the box.

Users will not see the actual email address of the person they are sending the email to, and the email will be sent from the SharePoint itself - so no spam.

You can extend this solution by adding a custom "Contact Us" form to create an item in the home page (use Custom List Form in SharePoint Designer, or Item Editor Plus from KWizCom to do so).

Also - you can use SharePoint to track these issues by adding a "Status" column that the user in charge can mark as "New, Waiting for someone else, Completed", or use the WF to create a task for each issue that is assigned to someone...

Lots of ideas, the nice thing is it is all free and you can extend and improve your solution as you go along!

* If you need help with configuring such a solution, contact me as we offer online training for these subject and in 4-5 hours online training you will be able to create and manage your own solutions even if you don't have any development experience.

Shai Petel,
VP Professional Services

Web site does not load well in IE 8

Using Internet Explorer 8, some web pages may appear broken or not load correctly...

We all remember how IE 7 broke 70% of the pages in Internet...
The bad news are IE 8 is going to do the same.

The good news are: It does not have to!

Microsoft has introduced a new meta tag you can add per page / site that will ensure IE8 clients will render the page in backward compatibility mode, so your site won't be broken...

Simply by adding a meta-tag to the response header:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

IE 8 clients will emulate IE 7 compatibility mode and your site should be able to load correctly.

More info for Per page:

More info for Per site:

Shai Petel

Monday, October 6, 2008

CRM Error: Generic SQL Error Code: 0x80044150

So, I have seen and checked very proposed solution to this error on the web.

The only problem associated with this issue I did not see any record of is of course the error I had with a customer recently...

The issue is complicated-simple issue...

Simple explanation would be:
Once you export and entity, add a new attribute with the same name as an existing one (not case sensitive - meaning 1= new_myattribute 2=New_myattribute) you will get this error.

Simple, Right?

Now, for the complicated way of getting this error...

Normally, the CRM will lower-case all letters in the attribute and add the "new_" prefix for you.

So - when looking for a property to check if it exists I used to have a lower-case case sensitive XML XPath search for it, and if I did not find it - I knew it was safe to add it...

Only that apparently the CRM 3.0 and CRM 4.0 has some inconsistency with the prefix of custom attributes...

One adds new_ while the other adds New_, this means that one of our customers who used the CRM SharePoint connector in CRM 3.0, upgraded the solution to CRM 4.0, and run our solution again - ended up with this error message since he had the old field from the upgrade and we were trying to add it as duplicated in the new version since we could not find it...

Well - complicated enough?

I will keep the conclusion short -
1: Be sure not to add duplicate attributes, or import will fail.
2: When looking for attributes - don't use case-sensitive comparison (although tempting in XML)!
3: Email the CRM developer guys and request nicely for better error messages ( don't tell them I sent you :) )

Well, Please feel free to post here any other problems / solutions related to this very generic error code.

Just for the record - the error code mostly refers to trying to assign data into a field that is too long... so if you didn't check that first - this would be a good time to do so... :)

Error using web part connection in list item form

Ever go this error when using a connection?
"Web Part Error: This page has exceeded its data fetch limit for connected Web Parts. Try disconnecting one or more Web Parts to correct the problem."

Well, it is known that the filter connections sometimes invoke this, and there are ways to fix it... but - I just found a "fluke" in the SharePoint connections infrastructure that is not caused by bad-coding at all.

As a matter of fact - I can reproduce it using only out of the box web parts and no custom code at all!

We wanted to have in our customers list, when a user go in to the display form of a customer, to get a list of contacts associated with this customer from the contact list.

So - we added the List View web part of Contacts list into the DispForm.aspx of the Customer list.

Than we used Custom Item Property (more information on www.kwizcom.com) that gets the current customer's title and sends it as a filter to the List View web part...

Sounds simple, only to find out that using List View web part on a display form, with a filter connection - is apparently (and unspoken) not supported!!!

It will always give an error "Web Part Error: This page has exceeded its data fetch limit for connected Web Parts. Try disconnecting one or more Web Parts to correct the problem.".

This has nothing to do with my code ( I found out couple of hours later ) since if I try it using the Query string filter web part - I get the same result every time.

Ok, after a while, I started looking for other creative solutions and found a work-around for this issue.

Converting the List View web part to a Data View web part will solve this issue and will allow you to add a filtered view of related information!!!

(Sorry for the !!!, just excited that it is not my code that caused the issue :) )

(* hint: to convert list view into data view - open the page in SharePoint Designer, right click on the list view and select the "convert to data view" option... )

Well, hope this helps save some lives, keep me posted if you have additions / questions,

Shai Petel,
VP Professional Services