Friday, 3 July 2009
Create custom reports using Site Content and Structure
After doing some research on existing reports provided by MOSS--"Manage Content and Site Structure", I thought we can do some thing over there.
Finally I deduced a way to add the new report to existing reports.
Steps are as follows:
1) Locate "Content and Structure Reports" list.
2) Add a new item for that list
3) Enter the following values in the new form displayed
Title = "All Documents(Aspx)"
CAML Query = "<Where><Eq><FieldRef Name='DocIcon' /><Value Type='Computed'>aspx</Value></Eq></Where>"
4) Now Navigate to "Site Actions-->Manage Content Structure"
5) Select View on the top toolbar and select "All Documents(Aspx)" from drop down.
Then the view would be displayed with all the pages in the portal.
Total number of results can be modified by choosing relevant number on the tool bar.
If we want to show only pages only with
a) Approved
Query: <Where><Eq><FieldRef ID="{fdc3b2ed-5bf2-4835-a4bc-b885f3396a61}"></FieldRef><Value Type="Number">0</Value></Eq></Where>
b) Rejected
Query: <Where><Eq><FieldRef ID="{fdc3b2ed-5bf2-4835-a4bc-b885f3396a61}"></FieldRef><Value Type="Number">1 </Value></Eq></Where>
c) Pending
Query: <Where><Eq><FieldRef ID="{fdc3b2ed-5bf2-4835-a4bc-b885f3396a61}"></FieldRef><Value Type="Number">2</Value></Eq></Where>
d) Draft
Query: <Where><Eq><FieldRef ID="{fdc3b2ed-5bf2-4835-a4bc-b885f3396a61}"></FieldRef><Value Type="Number">3</Value></Eq></Where>
e) Scheduled
Query: <Where><Eq><FieldRef ID="{fdc3b2ed-5bf2-4835-a4bc-b885f3396a61}"></FieldRef><Value Type="Number">4</Value></Eq></Where>
Cheers!We are done
Happy SPD'ing
Saturday, 27 June 2009
Host EXE files in MOSS
1) Create a folder in the shared location on the web server (should be repeated on all Front end servers)
2) Provide the web-sharing for that folder and add an alias name for that by selecting the Relevant Sharepoint Web Application in the web-sharing properties tab
3) Add every one to that folder from security tab with "READ" access only
4) Open IIS and browse this newly created folder properties and ensure that "Anonymous access" is enabled.
5) Add the link as follows in any content enabled pages
Download your executable from here: "<a href = "[servername]/[websharedfoldername]/[exename]">"EXEName" </a>
Cheers!! we are done
Happy SPD'ing
Saturday, 9 May 2009
Content Editor WebPart to Upload Multiple Documents to SharePoint Library
Then as an immediate resolution I have added an content Editor Web Part and added this piece of code chunks into that.
In this we are using the existing Upload file which can be found at 12 hive\Layouts.
<SCRIPT LANGUAGE="javascript">
function FilesUpload()
{
document.getElementById('idUploadCtl').MultipleUpload();
alert('File Uploading Completed');
}
</SCRIPT>
<INPUT TYPE="hidden" NAME="Cmd" VALUE="Save">
<INPUT TYPE="hidden" NAME="NextUsing" VALUE="http://[Server]/[Document Library]/Forms/AllItems.aspx">
<INPUT TYPE="hidden" VALUE="New">
<INPUT TYPE="hidden" NAME="putopts" VALUE="true">
<INPUT TYPE="hidden" NAME="destination" VALUE="http://[Server]/[Document Library]">
<INPUT TYPE="hidden" NAME="Confirmation-URL" VALUE="http://[Server]/[Document Library]/Forms/AllItems.aspx">
<INPUT TYPE="hidden" NAME="PostURL" VALUE="http://[Server]/_vti_bin/shtml.dll/_layouts/UpLoad.aspx" />
<INPUT TYPE="hidden" NAME="VTI-GROUP" VALUE="0">
<DIV ID='MukiDidAgain' >
<P CLASS="ms-toolbar">
<A HREF="javascript:FilesUpload()"
TARGET="_self">Save Files</A>
</P>
<OBJECT id=idUploadCtl name=idUploadCtl CLASSID=CLSID:07B06095-5687-4d13-9E32-12B4259C9813 WIDTH='100%' HEIGHT='350px'></OBJECT>
</DIV>
! Replace [Server] with your server URL and [Document Library] with the desired document library
Cheers! we are done
Happy SPD'ing.
Wednesday, 11 February 2009
MOSS Developer handy dandy tips
1)Access STSADM from any directory while in command prompt.
2) Recyle the Application Pool with command prompt.
******************************************************************************
3) Grab the Public Key Token while in Visual Studio Environment.
Command: C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\sn.exe
Arguments: -Tp "$(TargetPath)"
Check Output window option.
Now when we have a signed project, and after building that project, just click on the Tools-->Grab Public Key value button, then we can see that value in the output window.
******************************************************************************
4)Display all the Search Results before applying our custom XSLT/Styling
a) Open the Search Results Page in Edit Mode.
b) Click on "Modify Shared WebPart" link on "Search Core Results" web part.
c) Click on XSL Editor button and in the Opened Editor window paste the following code.
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform > <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/> <xsl:template match="/">
<xmp>
<xsl:copy-of select="*"/>
</xmp>
</xsl:template>
</xsl:stylesheet>
d) Click OK and then refresh the page with search key word again then we can see the full results without any styling or customizations.
******************************************************************************
5)Search for specific command in STSADM list at command prompt
stsadm -help createsite. This shows the command with parameters.
But if we want to rename the site then it would be tough for us trying to remember the correct operation Name.
Simply type in STSADM FIND "SITE" (with quotes, STSADM and Find are seperated using pipe symbol ) at the command prompt. It lists out all the commands which has word "site" in them.
******************************************************************************
6) Export the (My)sites list to end user with less effort.
Just type in STSADM -o enumsites -url http://moss:xxxxx >>c:\MySitesList.xml
And you are done. When the Operation is completed, then simply open C:\MySitesList.xml file for the details.
******************************************************************************
7)Display Time at your Command prompt
While executing the one of the STSADM commands, I found it took long time, but how much. We cant always look at the system time or your watch before executing command. I felt there should be some way in command window itself to show the command execution time.******************************************************************************
8) To Open Central Admin from command prompt
******************************************************************************
9) To perform mass publishing for documents/Images
******************************************************************************
10) Saving output of STSADM command
To save the output of STSADM Command into a text file use the following :
eg:stsadm -o addsolution -filename MySoln.wsp >>output.txt 2>&1
(Dont remove 2>&1--these are standard dos error handlers.)
If we are using -immediate or -time or -local (Asynchronous commands) with STSADM command, then next STSADM command would fail. Like:
stsadm -o retractsolution -name Mysolution.wsp -immediate
stsadm -o deletesolution -name Mysolution.wsp
The second command should execute after the first command has executed completely. But here it would fail.In order to avoid that we have two solutions
Solution One:
Solution Two:
******************************************************************************
11) Opening the Multiple Upload Window
Sometimes, I have seen in the client environment, "MultipleUpload" link is not shown in document libraries,which we will discuss later, but as a simple trick to enable that, try to do following
1. Open the document Library for which they cannot see "MultipleUpload"
2. Click on "UploadDocument" and the window opens with URL /_layouts/Upload.aspx?=[ListID and some blah blah]
3. Now add the "&MultipleUpload=1" at the end of the URL and press enter.
It would open the MultipleUpload screen, still if you are unable to see "MultipleUpload", then refer the "Content Editor Web Part tricks" in Interesting Links.
******************************************************************************
Happy SPD'ing