Tuesday, August 25, 2009

How to configure Alternate Access Mapping to your site.

Hi,

Whenever user working with MOSS or WSS on extranet or internet* environment. User always need to set the URL according to company's standard by not showing IP or server name in URL of you site. As by default MOSS/ WSS site showing on user's server name in URL.
So by setting the Alternate Access Mapping of with your live IP you can easily achieve your goal.
Here are the easy steps to do this:-

1. On the top navigation bar, click Operations.
2. On the Operations page, in the Global Configuration section, click Alternate access mappings.
3. On the Alternate Access Mappings page, click Add Internal URLs.
4. If the mapping collection that you want to modify is not specified, then choose one. In the Alternate Access Mapping Collection section, click Change alternate access mapping collection on the Alternate Access Mapping Collection menu.
5. On the Select an Alternate Access Mapping Collection page, click a mapping collection.
6. In the Add internal URL section, in the URL protocol, host and port box, type the new internal URL (for example, https://www.microsoft.com/) .
7. In the Zone list, click the zone for the internal URL.
8. Click Save.

For more information please refer :- http://technet.microsoft.com/en-us/library/cc263208.aspx

*For MOSS internet facing sites you need to perchase different licence from Microsoft.

Kuldee Kadyan

Thursday, August 6, 2009

Open a page in edit mode directly in Sharepoint

Hi,

Because of some web part problem or browser issues user is not able to open page in edit mode. Then what should he do??? Don't worry i will suggest you something may be it will work for u also as worked for me.

Just type ListURL?ToolPaneView=2 in your browser and get the things works for you.

Enjoy!!!

Kuldeep Kadyan

Add Link on List Column Value Using DataView WebPart

Add HyperLink on any column value in a Form using Dataview webpart is now its very easy.

Use this trick for your solution:-

<script language="javascript">
var a ="<xsl:value-of select="@FileName" />"
document.write('<a href=/HelpDocuments/' + a + '> download </a> ');
</script>

*change curly brackets with respective angular brackets.

Hope its works for you also!!!

Tuesday, July 14, 2009

How to delete Bad lists from SharePoint

Hi,

I was doing development in my last project (WSS3.0). I was doing some R&D on a SharePoint list. That list goes corrupted and not even i was able to open that.

So i decide to delete from my sharepoint site. What is this!!! how can i delete this list because delete option is coming under the list settings. What i have to do now???

Then i got a brilliant idea in my mind why not i use STSADM for this.

Here is that superb command which can help everybody who is hanged up with this problem:-

stsadm -o forcedeletelist -url http://localhost/Lists/Badlist

Enjoy!!!

Kuldeep Kadyan

How to get Display Name of List Column in SharePoint

Hi,

Few days back i was struggling a lot about to get the Display Name of list columns because client was not ready to move a single bit on his decision to show only column's display name not the internal name.

I spent near about the whole day to find out the solution of this problem. Thank god finally i got the lines of code that helped me.

I do not want to anybody else will struggle for the same.

I am putting code here:-

Get Display name of list columns

foreach(DataColumn column in table.Columns)
{

column.ColumnName = list.Fields.GetFieldByInternalName(column.ColumnName).Title;

}

It can save your time for sure.

Kuldeep Kadyan.

How to get Sum of any column in DataView Web Part in SharePoint

Hi,
Another basic requirement of client if you are using the DVWP in your project. Show the total of any column. I spent 3-4 hours to get it down but finally i found that.

Find sum of any column in DVWP

{xsl:value-of select="sum(/dsQueryResponse/Rows/Row/@fld_EmployeeSalary)" /}

Replace curly brackets with angular brackets
You had done that here.

Enjoy!!!
Kuldeep Kadyan

How to get current logged in user's group name in SharePoint

Hi,
Based on my last project requirement i need the current logged in user's group name so that we can hide and show something on page load.

There were a lot of ways but i like the smallest way to do this.
Here it is:-

Get Current User Group (C# example)

foreach(SPGroup group in SPContext.Current.Web.CurrentUser.Groups)
{ string groupName = group.Name;
Response.Write(groupName);
}

Seems cool???

Kuldeep Kadyan

How to get TOTAL number of records under a group in Data View Web Part in SharePoint

Hi,
Few days back i was struggling with different aspects of Dataview webpart in sharepoint designer.
I badly need to show the total of records under each group as we were having different level of grouping in our DVWP.

Finally i got solution for that. I just want to share with you.

Here it is:-

Get Total of Rows under a group

{xsl:value-of select="count($nodeset)" /}

*To get total number of records in DVWP
{xsl:value-of select="count(/dsQueryResponse/Rows/Row)" /}

Replace curly brackets with angular brackets.
You will get the result what exactly you want.

Have a fun!!!

How to call a Javascript function to use XSLNode value in SharePoint Designer

Hi,
To use any node(item) value in custom SharePoint page for SharePoint list using javascript you can use like this.

GetPic(var status)
{Put your code here}

Call JavaScript Function
{script type="text/javascript"}
document.write(GetPic("{xsl:value-of select="@Status" /}" ) )
{/script}

Replace curly brackets with respective angular brackets.
You must write &quot at the place of quote otherwise there will be xslt error.

Hope that will help you.

Thursday, February 19, 2009

"Content xxx type not found in web" error - Portal Server 2007

We have a new portal server installation that is working fine except for one strange error. We created our new site using the "Publishing Site" template and also created subsites below it. All that went fine. However, if we try to create a new page ("Create Page" command from the "Site Actions" Menu) from any of these sites we get this error:
Content type '0x01010007FF3E057FA8AB4AA42FCB67B453FFC100E214EEE741181F4E9F7ACC43278EE811'not found in web 'http://mossServer'

When i check the content type on my website i was shocked there was nothing means not even single content type.
After a lot of google up i found some solutions.
1. Run the Sharepoint products and technologies configuration wizard once. (worked for me).
2. Go to Site Central Admin, User Permissions for Web Application and be sure "Use Client Integration Features" and "Use Remote Interfaces" are enabled. That can also work for you.

For reference :-
http://msmvps.com/blogs/obts/archive/2007/03/28/721173.aspx

http://naspinski.net/post/Content-type-0x01010007FF3E057FA8AB4AA42FCB67B453FFC100E214EEE741181F4E9F7ACC43278EE811-not-found-in-web.aspx

Hope this will help you. Cheer!!!

Kuldeep Kadyan