Friday 15 March 2013

InfoPath 2010 At least one check box should be checked

Here is a simple solution for making one of the check box is checked before submitting the form

1. Create your checkbox fields (of data type true/false boolean)
2. Create a flag field and set default value to zero
3. Create a Submit Button
4. Create a message view
 
5. For each check box add 2 rules
6. Rule 1:  if checkBox1=true, Set flag = flag + 1


Rule 2: If checkBox1=False, set flag = flag - 1

 
7. On Submit Button Add 1 rule  If Flag=0, switch to message view



Hope This helps...


Sunday 10 March 2013

The Execute method of job definition Microsoft.SharePoint.Administration.SPSqmTimerJobDefinition threw an exception Event ID 6398

The Execute method of job definition Microsoft.SharePoint.Administration.SPSqmTimerJobDefinition (ID 9fb31cc3-1041-407c-bb02-4494e180b7c9) threw an exception. More information is included below.

Data is Null. This method or property cannot be called on Null values.

Resolution
Go to Central Admin - monitoring - review job definitions - job history (left) and change the view (right) to Failed jobs.You can see it is CEID Data Collection which is causing this problem. Click on Failed link
CEIP data collection job-  disable it...

Before doing this make sure the following things
1. In Central Administration, select System Settings
Click Configure privacy options under Farm Management
Under Customer Experience Improvement Program, select ‘No, I don’t wish to participate
Next this needs to be disabled for all web applications, including Central Administration.

2. Select Application Management, then Manage Web Applications
Select the first Web Application in the list and click General Settings
At the very bottom of list, select No in the Enable Customer Experience Improvement Program
Repeat for all Web Applications in the farm.

Friday 8 March 2013

How to get list of all users in a site collection

In your url just append _layouts/people.aspx?MembershipGroupId=0. This will give you all users from all groups in a site collection.

If Url is http://localhost:9000/default.aspx, try with 
 http://localhost:9000/_layouts/people.aspx?MembershipGroupId=0

Now,If you want to delete a user from site collection, there is remove option in the breadcrumb menu

How to get list of names of webparts on a page

In your url just append contents=1. This will give you all the web parts that are deployed.

For example: if Url is http://localhost:9000/default.aspx, try with http://localhost:9000?contents=1

Now, If any web part makes errors on your page, you can disable/remove from this page



Thursday 7 March 2013

"Related Content" link in work flow Task form does not open in browser

Below is the step by step procedure for solving the issue

1.Open C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\template\layouts.
2. Locate the WrkTaskIP.aspx.  Make a copy of the file and Open in sharepoint designer.
3.  Locate the line SPHttpUtility.NoEncode(m_pageDescription,Response.Output); remove this and add below code 
<%
if(m_pageDescription.Contains(".xml"))
{
//Forcing any xml items to open with forms services
SPHttpUtility.NoEncode(m_pageDescription.Replace("http",SPContext.Current.Web.Url+"/_layouts/FormServer.aspx?DefaultItemOpen=1&ClientInstalled=true&Options=DisableSave&XmlLocation=http"),Response.Output);
}
else

SPHttpUtility.NoEncode(m_pageDescription,Response.Output);
}
%>
4. Do save

 hope this helps..

Application Server Administration job failed for service instance. Event ID 6482

There were many issues that require you to clear the share point configuration cache on your servers.

Below is the step by step provided by Microsoft for Clearing Configuration Cache
1. Stop the Windows SharePoint Services Timer service (Found in Windows Services)
2. Navigate to the cache folder
Drive:\ProgramData\Microsoft\SharePoint\Config\<GUID>
There may be more than one  GUID folders
3. Locate the folder that has the file "Cache.ini"
4. Back up the Cache.ini file.
5. Delete all the XML configuration files in the GUID folder
Note : make sure that you do not delete the GUID folder and the Cache.ini file that is located in the GUID folder.
6. Open Cache.ini file in Note Pad, click Select All and Delete. Type 1, and then Save. Close the Note Pad.
7. Start the Windows SharePoint Services Timer service
8. Restart IIS
Make sure that the Cache.ini file in the GUID folder now contains its previous value, not 1.

Resolving the super user/super reader account utilized by the cache is not configured


By default, the Portal Super User account is the site’s System Account, and the Portal Super Reader account is NT Authority\Local Service.

Give domain\superuser, Full control in user policy of the particular site from Central administration. And also for domain\superreader Full read permission in user policy.

If your web application is using claims based authentication the users should be displayed like i:0#.w|domain\superuser and i:0#w|domain\superreader.

To add the user accounts to the Web application by using Windows PowerShell
Verify that you meet the following minimum requirements: See Add-SPShellAdmin.
Copy the following code and paste it into a text editor, such as Notepad:

$wa = Get-SPWebApplication -Identity "http://<server>/"
$wa.Properties["portalsuperuseraccount"] = "i:0#.w|domain\superuser"
$wa.Properties["portalsuperreaderaccount"] = "i:0#w|domain\superreader"
$wa.Update()


Save the file, naming it SetUsers.ps1. Close the text editor.

On the Start menu,Open SharePoint 2010 Management Shell. Change to the directory where you saved the file.At the Windows PowerShell command prompt, type the following command: ./SetUsers.ps1

After you've run these PowerShell cmdlets  perform an IISRESET to finish it off.

Limiting People Picker to a certain OU in Active Directory

If a Web application is using Windows authentication and the site user directory path is not set, the People Picker control searches the entire Active Directory to resolve users' names or find users, instead of searching only users within a particular organizational unit (OU). The Stsadm setsiteuseraccountdirectorypath operation allows the user's directory path to be set to a specific OU in the same domain. After the directory path is set to a site collection, the People Picker control will only search under that particular OU.
To restrict People Picker to a certain OU in Active Directory, type the following command:

stsadm -o setsiteuseraccountdirectorypath -path <Valid OU name> –url <Web application URL>

The following example configures People Picker to only return users and groups in the OU named "Sales":
stsadm -o setsiteuseraccountdirectorypath -path "OU=Sales,DC=ContosoCorp,DC=local" –url http://ServerName

Only a single site user directory path can be set at a time for a site collection. Because this property specifies only one OU at a time, you should run the Stsadm setsiteuseraccountdirectorypath operation only once per site collection.

To retrieve the current user account directory path for the site, use the following syntax:
stsadm -o getsiteuseraccountdirectorypath -url <Web application URL>

Work Flow is not updated. Showing as cancelled in work flow column

Sometimes this situation may happen, you are making changes to your SPD workflow and they are not reflected on the list/doc library where the workflow is deployed.

reason is that, SPD will use the cahced information from a location such as the following:

%System Drive%\%user%\Local\AppData\Microsoft\WebSiteCache

Here you will find a folder named similar to your SharePoint site on which you are working.

Delete this folder and restart SharePoint Designer and IIS. Make any changes to your workflow and that should be reflected onto your list/library.