Skip to main content

Posts

Showing posts from 2012

Infopath 2010 Tips - Custom close button and hide the ribbon

How to hide the ribbon in Infopath 2010 Go to list – Customize List tab- Click on Modify Form Webparts – Click on the content type form – Edit Form A new page with the Infopath form webpart would come up   Click on Edit webpart Uncheck Infopath Ribbon or toolbar. Click Apply & OK. Click on Stop Editing of Page. Now when the Edit form is displayed on browser, it would not have the ribbon. How to add custom close button Open the form in Infopath 2010 Add a button - Select the button and click Manage Rules In the rules pane – click on New – Action – Add – Close the form No conditions to be added. Rename the button to Close/Cancel Publish the form

Multiple ways to hide My Settings/Sign out/Personalize/My Profile in Welcome Username control in SharePoint 2010

Jquery   to hide My Settings, Personalize this page, Sign in as different user jQuery(document).ready(function($){   $("[text='Sign in as Different User']").remove();   $("[text='My Settings']").remove();   $("[text='Personalize this Page']").remove(); }); Hide My Site and My Profile using CSS To hide the menu options, add the below CSS in master page .ms-MenuUIUL LI[text='My Site'] {  DISPLAY: none } .ms-MenuUIUL LI[text='My Profile'] {  DISPLAY: none } .ms-MenuUIUL LI[text='My Settings'] {   DISPLAY: none }

Max limit and performance of SharePoint 2010 Workflow

The max number of workflow running is by default set to 15. This is applicable for both SPD and visual studio workflows. The number does not include the workflow instances which is 'In progress' state. The number represents the number of active workflows using the processor and it is set for the entire farm and does not depend on the number of front end servers. The number can be configured using powershell command Set-SPFarmConfig More can be read from http://technet.microsoft.com/en-us/library/ff607962(v=office.14).aspx The existing farm settings can be obtained using the command Get-SPFarmConfig Reference < http://technet.microsoft.com/en-us/library/ff607745(v=office.14).aspx > To know more about SharePoint workflow performance and scalability parameters read the msdn article - http://msdn.microsoft.com/en-us/library/dd441390(office.12).aspx More about SharePoint 2010 workflow http://msdn.microsoft.com/en-us/library/hh237664(v=office.14)

Parallel tasks in serial workflow - Sharepoint 2010

It might be required that in a serial workflow with mutliple stages, there might be more than one users. The workflow should proceed to next step, if one of them completes the step. For e.g., consider there are 2 groups of reviwers, say Group A and Group B. When an item is created, an email would be send to Group A users. If one of the members in Group A completes the task, it should send mail to Group B users. In such scenarios, create 2 sharepoint groups, one for Group A and one for Group B. Add all the members to the respective groups. Create the workflow in SPD and after first action, assign the task to Sharepoint Group A. Now if anyone of the users in Group A completes the task, the task status changes to completed and the next step would be continued. It does not require that all members in Group A complete the task assigned.

Cannot open SharePoint 2010 Approval task form from Outlook

When trying to click on Open this task from Outlook 2010, it brings an error - " Outlook cannot open a new form. The form contains schema validation errors" Element '{ http://www.w3.org/1999/xhtml}div ' is unexpected according to the content model of parent element '{ http://schemas.microsoft.com/office/infopath/2009/WSSList/dataFields}Body '. As given in the error message, the issue is with the Body column of the workflow tasks list. For the approval workflow, there would be a tasks list. In the workflow task list, the Body column is Enhance Rich multi-line column. Change the setting to Plain text, instead of enhanced rich text. After that do an iisreset.

Remove the checkbox in Dataview/XsltView WP in SP2010

When inserting a dataview webpart in SP2010, checkboxes appear on the left side of each row. To remove it, do the following from Sharepoint- Go to the list - View Settings - in Tabular section, uncheck  'Allow individual inline editing' To do it in SPD, there is no direct setting- In the View tag of XSLTwebpart, add 'Tabular = False' e.g. before - <View Name="{123456788-A999-ABBC-VVYY-1234ABCDXX}" MobileView="TRUE" Type="HTML" Hidden="TRUE" DisplayName="TestView" Url="/SitePages/Test.aspx" Level="1" BaseViewID="1" ContentTypeID="0x" ImageUrl="/_layouts/images/generic.png"> after - <View Name="{123456788-A999-ABBC-VVYY-1234ABCDXX}" TabularView="False" MobileView="TRUE" Type="HTML" Hidden="TRUE" DisplayName="TestView" Url="/SitePages/Test.aspx" Level="1" BaseViewID="1"

Access denied by Business Data Connectivity – Solution

Sometimes even as the administrator, the error " Access Denied by Business Data Connectivity" might come when trying to open external list To resolve the issue Go to Central Administration -> Application Management -> Manage Service Applications -> Business Data Connectivity Service* -> [Your Entity] -> Set Permissions Then set the permissions as re quired  Then do an IISReset    

External Lists in SP2010

External lists in Sharepoint 2010 can be used to read/add/update/delete data in any external data- source. To create external list, a external content type has to be created. Refer the below links on msdn on how to create external content type How to create external content type Creating SharePoint Server 2010 External Content Type Associations with SharePoint Designer 2010 Sharepoint-2010-external-content-type-to-read-data-from-sql-server-using-sql-authentication-and-secure-store-service.aspx The below links explain on how to create external list How to create external list https://www.nothingbutsharepoint.com/sites/eusp/Pages/sharepoint-2010-external-lists.aspx More about BCS functionality in msdn http://msdn.microsoft.com/en-us/library/ee557949.aspx

Disbale Submit button in Infopath list forms in Sharepoint 2010

List forms can be customized using Infopath 2010. If the fields are kept mandatory, the red asterik sign appears on text fields. It would appear till the field is filled . Also alt text would come as 'Cannot be blank', which can be annoying at time. The alternative option would be to disable the Submit button till all the mandatory fields are filled. Click on Submit button, click on Manage Rules and Formatting Select the fields that are required and check on Disbale the control. For e,g, if in the form, say the fields, Name, Designation, Company Name are required, create the rule to evaluate-  Name is blank or Desingnation is blank or Company Name is blank. When the condition is true, Submit button is disabled. When all three are filled, the condition is false and therefore Submit buton is enabled.

Tips for Noteboard webpart in sharepoint 2010

In noteboard webpart, when there are no comments, there is text that appears as shown Add the following javascript in the page layout <script type="text/javascript">    $(document).ready(function() {             HideCommentText();      });     function HideCommentText() {             if ($("div :contains('There are no notes posted yet. You can use notes to comment on a page')").length == 0) {                 setTimeout(HideCommentText, 50);             }             else {                 $("div :contains('There are no notes posted yet. You can use notes to comment on a page'):last").html("");             }      }        </script> -------------------------------------------------------------------------------------------------------------------------------- If you need to add some other text when no comments are there, you can add that to html tag , for e.g.  "Enter comments her

Play video in Sharepoint 2010 - tips

The media player webpart can be used to play videos in Sharepoint 2010. It is a silver light webpart and silver light has to be installed in the client machines to view the video's. To get teh webpart in webpart gallery, Publishing feature has to be activated in site collection and site level. Steps on how to install the webpart can be found in http://dotnetfinder.wordpress.com/2010/11/08/sharepoint-2010-how-to-use-audio-and-video-webpart/ This webpart is part of sharepoint enterprise edition. Video webpart can be played in content editor webpart also. In CEWP, enter the below code <object classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" width="600" height="400" id="mediaplayer1" title="Win Media Player">   <param name="FileName" value=" http://filelocation ">   <param name="AutoStart" value="True">   <param name="ShowControls" value="

User profile property values maintained in SSP tables in MOSS 2007

The user profile properties values are stored in SSP tables in MOSS 2007. The values can be found in UserProfileValue table in SSP The values are stored for each of the Record ID. Each RecordID corresponds to one user. Also in the table, the values are given for each PropertyID The mapping of PropertyID and its corresponding description can be found in the table PropertyList. Note - it is not advisable to manipulate the SSP DB's.

RunTime Exception - Duplicate site id xxx-xxx-xxxx was found.

The error came when trying to install a hotfix/patch to the sharepoint server. The issue had occurred because there was an old copy of the database which was used for detach and attach. Had tried to create a new webapplication using a copy of the running webapplication in the same farm. It encountered error since there was a DB id conflict in the configuration DB. So deleted the web application, but the content DB had not been deleted completely. So ran the stsadm delete old database command to remove it Stsadm -o sync -deleteolddatabases 0 More about deleteolddatabase -  http://technet.microsoft.com/en-us/library/cc263196.aspx

Delete unwanted app pools in Sharepoint 2010

The powershell commands to delete the unwanted app pools in Sharepoint  Go to Programs --> Sharepoint 2010 Products --> Sharepoint 2010 management Shell Type the command -- Get-SPServiceApplicationPool | select Name It would display the set of names. Enter the below command to remove/delete the app pool Remove-SPServiceApplicationPool -Identity "<enter the unwanted app pool name>" It would ask for confirmation, enter 'Y' to complete the removal.

Sharepoint interview questions

Difference between Site Template and Site Definition <<http://www.c-sharpcorner.com/uploadfile/Roji.Joy/differences-between-site-definition-and- site-templates/>> http://msdn.microsoft.com/en-us/library/aa979683 What is feature stapling http://www.etechplanet.com/blog/understanding-feature-stapling-in-sharepoint-7c-stapling - features-to-site-definitions.aspx http://blogs.msdn.com/b/kunal_mukherjee/archive/2011/01/11/feature-stapling-in-sharepoint - 2010.aspx http://msdn.microsoft.com/en-us/library/bb861862(v=office.12).aspx difference between sharepoint 2007 and 2010 solution << http://www.milesconsultingcorp.com/SharePoint-2007-versus-2010 - comparison.aspx#SoftwareDevelopmentChanges>> feature upgrade steps http://www.sharepointnutsandbolts.com/2010/06/feature-upgrade-part-1-fundamentals.html http://www.rharbridge.com/?page_id=103 http://blog.petermunch.net/2010/04/30/versioning-and-upgrading-your-features-with - sharepoint-2010-application

Sharepoint 2010 Search auto suggest

Sharepoint 2010 has a new OOB search auto complete feature. This is a pre search added enhancement new in sharepoint 2010. If the keyword is entered 5 times, the sixth time onwards it would be shown to the user while typing the keyword. Admins can add certain keywords to the query database, using powershell. Details on how to do it can be found in http://technet.microsoft.com/en-us/library/hh148698.aspx Using powershell and csv file to add multiple keywords is exlpained in http://get-spscripts.com/2010/07/add-pre-query-search-suggestions-with.html Custom sandbox solution for the same can be read in http://www.sharepointusecases.com/index.php/2010/04/search-autocomplete-for-sharepoint-2010-lists/

Add custom tab for search in MOSS 2007

The requirement was to have a custom tab which would get search results only from one site in the site colletion Steps done In the SSP, do the following 1. Create a new content source, with the site url and setting "Crawl only the SharePoint Site of each start address" selected 2. Create a new scope - Add rule to include content from the newly created custom content source 3. On the all site content source, add a new rule to exclude content from the custom content source 4. Run a full crawl on custom content source In the Site Settings, do the following 1. In Site Collection Administration settings - click on Search Scopes 2. Create a new display group  and select the custom scope created 3. Go to Search site and create customsearch page, customsearchresults page and customadvancedsearch page 4.In Search site, default page , click on Edit page 5.Click on Add New Tab and for Page, give the newly created search page url. Click ok and publish 6. Click on Custom ta

Display an icon in search results page in MOSS 2007 to indicate pictures in the list item

The custom list had a column called as Snapshots which was of the type Hyperlink or Picture. The need was to customize the search results page to display an indicator for list items with images. To do so, go to SSP - Search Settings - Metadata properties - New Managed property In the New Managed Property window, do the following- Enter the property name and select the property type as text In Mappings to crawled properties - select 'Include values from a single crawled property based on the order specified' Click on Add mapping and find the custom list column and click Ok Click OK on the managed property window. Then Do a full crawl Edit the search results page and edit search core results webpart In Result Query option - selected columns, add the custom column In the XSL editor - add the following <xsl:variable name="Customicon"> <xsl:value-of select=" <enter the column name> " /> </xsl:variable> <xsl:choose> &l

SP2013 preview beta available

Check out for more info on SP2013 Preview http://technet.microsoft.com/en-us/sharepoint/fp142366 http://sharepoint.microsoft.com/en-us/preview/sharepoint-resources.aspx 2013 sharepoint http://msdn.microsoft.com/en-US/sharepoint/fp123576 To know more about Sharepoint Apps http://msdn.microsoft.com/en-us/office/apps/fp160950.aspx http://msdn.microsoft.com/en-us/library/office/apps/jj220030(v=office.15 )

The URL 'XXX' is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web.

When trying to upload document or attachment, the error "The URL 'XXX' is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web. " comes up. This could come up if Sharepoint 2010 is installed as stand-alone server and the content DB has reached 4GB. When SP2010 is installed as stand-alone server, it stores all the databases in SQL Express 2008, which comes bundled with SP2010. It would not configure to any other server instances, even if it is installed in the server. To resolve the issue, refer the link http://www.smattie.com/2012/04/14/how-to-fix-sql-server-express-db-size-limitation-of-4-gb/ Or else take a backup of the farm and uninstall Sharepoint 2010 and reinstall as a single server farm installation. Configure it with SQL 2008 developer or enterprise edition or with SQL 2008 R2 edition. Restore the content DB to the new setup and perform a DB upgrade command on the restored content DB.

How to change the time zone for Sharepoint 2010 Central Admin, Web Application and Sites

To change the time zone for the Web Application - 1. Go to Central Admin - Application Management - Under Web Applications, select Manage Web Applications 2. Select the webapplication required, and on the ribbon select General Settings - General Settings 3. In the new window, select the default time zone required. To change the time zone for the Site - Go to Site Actions - Site Settings - Reginal Settings To change the time zone for Central Admin - There is no direct url present from central admin to change the timezone Add /_layouts/regionalsetng.aspx after the central admin url to get the regional settings window E.g. the url would be http://<servername>:<portno>/_layouts/regionalsetng.aspx

VseWSS1.3 System.UnauthorizedAccessException: Attempted to perform an unauthorized operation.

When trying to deploy the wsp thru stsadm command for MOSS 2007 site, the installation failed. In the command prompt, it just showed, the Solution installation failed. Or  When trying to deploy it thru VS2008, it gave error VseWss 1.3 - System.UnauthorizedAccessException: Attempted to perform an unauthorized operation. To resolve – Open inetmgr and check the app pool for VseWSS. Ensure the app pool has complete access on the site collection and on the farm.

Error:'The following users do not have email address specified', when setting alerts in MOSS 2007

The above error occurred when trying to set alerts for users in one of site in MOSS 2007. The outgoing email is configured and there were no errors during that time. [Note - the SMTP server was configured months after MOSS was installed and site was up and running in the server] Go to SSP and in User Profile and Properties and select View Import Connections. If no connections are present, create a connection with the ad. Then do a full import. This would solve the issue. The error could still be coming because, the emails are sent based on the email address stored in the UserInfo table and it has not been synced with the email address in the user profile properties in the SSP. Would have to run the stsadm commands to sync the both. Command - stsadm -o sync -synctiming m:3 http://technet.microsoft.com/en-us/library/cc263196(v=office.12 ) If the issue still persists, delete the users from Sharepoint users and groups in the site, and add them again and run the sync job. This wou

Add images to items in custom list in Sharepoint 2007

Had a requirement to include images to a custom list (along with single-line and multi-line columns) in Sharepoint 2007 server. There were around 100 items to be added and wanted to find a work-around than adding as attachments to the respective items. Created a standard name format for the images Eg Name1, Name2 etc in the harddisk Created the custom list with the required columns and for image created Hyperlink or Picture column and selected the format for image as Hyperlink. Create a picture library in the site. Opened the picture library in Windows explorer and copied the images to the Picture library The image url now would be http://<siteurl>/<listname>/<imagename.imageformat> for eg - http://xyzsite.com/Piclib/Name1.jpg With a little of formatting in excel the column with the url's can be created. Edit the list in datasheetview and copy-paste the url row to Image column, in the list If required, can change the Image column format to Picture and it

Web Part Error: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type could not be found or it is not registered as safe - error in Sharepoint 2010

Deployed solution using powershell in production, and activated the feature in the site collection. But when trying to add the webpart, it shows "Web Part Error :A Web Part or Web Form Control on this Page cannot be displayed or imported. The type could not be found or it is not registered as safe" Checked in the webpart gallery and when trying to open the webpart, it is the same error. In web.config the entry is present for the custom webpart and it is set as Safe = True On further anlaysis found that the namespace mentioned in the web.config entry is not correct and corrected the same. Change the namespace in web.config to the name mentioned in .webpart file. Open the .webpart file in notepad and check the entry, the namespace is available under type name. Just remove the text after the last period. Refreshed the page - It worked !!

How to delete backup/restore job which is stuck in Sharepoint 2010

Sometimes when doing restore thru Central Admin, the job would go on for a long time without any progress being shown on the page. To stop the process and to re-run the restore job again, user would have to kill the running job. To force stop the job - Go to Cental Admin -> Monitoring -> Review Job Definitions -> Select Backup/Restore Timer Job and click Delete.

Audit Log Reports issue in sharepoint 2010

When enabling audit log reports, there were a couple of issues faced, given below 1.        I could not find the Audit Log Reports link in Site Collection Administration. Enabled it using stsadm as given in the below link How to enable the audit log reports link - http://www.danielbrown.id.au/Lists/Posts/Post.aspx?List=276dae61%2D6562%2D4ad1%2D8ca5%2Dba66c07b0cff&ID=47&Web=8a2513e7%2D4048%2D450e%2Dbd08%2Dea5ab59830ef 2.        When trying to generate audit reports or when trying to click Browse to select the location, I was getting an error "An unexpected error has occurred” with a correlation id. a.        As mentioned in sites, I checked in ULS logs for the description – The ULS logs can be found in C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS b.       There was an exception related to Search c.        Checked the Search Service, it was enabled. But the search did not work in the site. So deleted and enabled Search serv