Monday, August 13, 2012

Adding permissions to a group that was created without permissions

If you have created a group in SharePoint 2010 and did not assign it permission at the time of creation, the following steps will allow you to add permissions.

  1. Site Actions >> Site Permissions
    1. image
  2. On the ribbon, select Grant Permissions (Note: your group will not be visible in this list of groups)
    1. image
  3. Enter your group in the Select Users box (ex: Tony_Readers)
    1. image
  4. Click the “Check Names” button
    1. image
  5. In Grant Permissions, select "Grant user permissions directly" and select the permission(s) you wish to grant the group.
    1. image
  6. Click Ok

When the list refreshed, you will now see your group in the list of groups and it will have permissions.

Monday, July 30, 2012

Attach to the correct w3wp process in Visual Studio 2010

In Visual Studio 2010 on W2k8R2 or W2k3

Click Tools >> External Tools

Click Add

For SharePoint 2010 (W2k8R2 IIS 7)

Title: w3wp process

Command: %windir%\system32\inetsrv\appcmd.exe

Arguments: list wp

Select, Use Output Window

Click OK

clip_image001

For SharePoint 2007 (W2k3 IIS 6)

Title: w3wp process

Command: cscript.exe

Arguments: c:\windows\system32\iisapp.vbs

Select, Use Output Window

Click OK

image

 

To use:

Click Tools >> w3wp process

In the Output window, you will see the results

clip_image002

To Attach to the correct process:

Press ctrl + alt + p

Select the wpw3 process with the corresponding ID from the values in the Output window

clip_image003

Click Attach

Thursday, April 8, 2010

Seven Words You Can’t Swype

What if the great George Carlin would have used the Swype keyboard to write one of this most famous jokes?  The joke would go something like this:

Seven Words You Can Never Say on Television

Sit

Poos

Duck

Count

Chaucer

Mother

Tuts

George would have been out of a job…

Now I’m not saying that those words are necessary, but there are times when they are a requirement. Let’s just say the bank is issuing you yet another ATM card (since they did not link the past 7 to your account) and you want to text your displeasure to your wife, brother or some friends.  This is a case where it would be helpful to have such words available to Swype.  This is what your message looks like when Swyping your discuss.

“Duck those Mother, ducked up my card again. What the duck!”

What the duck, that’s what I say.

Other then this minor non-issue the Swype keyboard on my HTC HD2 ROCKS!

If you read this and you don’t know what Swype is, go check it out:  http://www.swypeinc.com/

sevenWordsYouCantSwype

Wednesday, July 22, 2009

Parsing SharePoint delimited Multiple Value Lookup field values from web service results

When you query a list that contains a Lookup Column that allows multiple select values the value is returned like the following:

ows_MyMultipleSelectLookupField="1;#Foo;#2;#Foo Bar"

Yes, there’s that delimiter (;#) again.

The following two methods can help you get the Lookup values selected in the item.

/// <summary>
///
Remove the nasty delimiter
/// This can be used when returning multiple select lookup field values from a SharePoint list via a web service
/// Ex: ows_MyMultipleSelectLookupField="1;#Foo;#2;#Foo Bar"
/// returns Foo, Foo Bar
/// </summary>
/// <param name="sFieldValue"></param>
/// <returns>
List of string values</returns>
public static List<string> GetDelimitedLookupValuesList(string sFieldValue)
{
List<string> results = new List<string>();

System.Text.RegularExpressions.Regex regexMultiValueField = new System.Text.RegularExpressions.Regex(@"(?<id>(\d+));[#](?<value>[(\w*)+\s]+)",
System.Text.RegularExpressions.RegexOptions.Compiled);
System.Text.RegularExpressions.Match choice = regexMultiValueField.Match(sFieldValue);

while (choice.Success)
{
results.Add(choice.Groups["value"].Value);
choice = choice.NextMatch();
}

return results;
}

/// <summary>
///
Remove the nasty delimiter
/// This can be used when returning multiple select lookup field values from a SharePoint list via a web service
/// Ex: ows_MyMultipleSelectLookupField="1;#Foo;#2;#Foo Bar"
/// returns {1,Foo} {2,Foo Bar}
/// </summary>
/// <param name="sFieldValue"></param>
/// <returns>
Dictionay of id,value pairs</returns>
public static Dictionary<string, string> GetDelimitedLookupValuesDictionary(string sFieldValue)
{
Dictionary<string, string> results = new Dictionary<string, string>();

System.Text.RegularExpressions.Regex regexMultiValueField = new System.Text.RegularExpressions.Regex(@"(?<id>(\d+));[#](?<value>[(\w*)+\s]+)",
System.Text.RegularExpressions.RegexOptions.Compiled);
System.Text.RegularExpressions.Match choice = regexMultiValueField.Match(sFieldValue);

while (choice.Success)
{
results.Add(choice.Groups["id"].Value, choice.Groups["value"].Value);
choice = choice.NextMatch();
}

return results;
}


Usage:



//returns Foo, Foo Bar
List<string> myValues = GetDelimitedLookupValuesList("1;#Foo;#2;#Foo Bar");

//returns 1,Foo 2,Foo Bar
Dictionary<string,string> myValues = GetDelimitedLookupValuesDictionary("1;#Foo;#2;#Foo Bar");

Thursday, June 18, 2009

Getting SharePoint’s Explorer View in IE8 on Windows Server 2003

If you get this error when viewing a Document Library in SharePoint 2007:

“Please wait while Explorer View is loaded. If Explorer View does not appear, your browser may not support it.”

Most likely your WebClient service is not running on your local machine.  Simply crank it up using the following steps.

  1. Go to START >> RUN
  2. Type services.msc
  3. Locate the WebClient service
  4. Open the Properties

clip_image001

  1. Start up type to Automatic (otherwise on the next boot you will have this issue again)
  2. Click Apply
  3. Click Start
  4. Click OK

Wednesday, June 10, 2009

Getting a client side created InfoPath 2007 form in to a InfoPath Visual Studio project

Do you have an InfoPath form that was created in the InfoPath client and now you want to add it to a Visual Studio InfoPath project?

Here are the basic steps.. Follow along kids.

  1. Extract the source files from your client side form in to a directory called ClientSource. (you should know how to do this)
  2. Create a new InfoPath project in Visual Studio
  3. Close the open xsf file in Visual Studio
  4. Delete all the files under InfoPath Form Template directory in the Visual Studio solution
  5. In the ClientSource directory, edit the manifest.xsf file in NotePad++ or your favorite text editor and make the following changes.
    1. Delete the attributes "publishUrl and "trustLevel" (if exists) of the xsf:DocumentClass element
    2. Delete the properties xsf:property name="componentId" and xsf:property name="xmlToEditName"
    3. Add the sibling <xsf2:managedCode projectPath="path to and including csproj" language="CSharp" version="2.0" enabled="yes"></xsf2:managedCode> under xsf:extensions/xsf:extension/xsf2:solutionDefinition/xsf2:offline
      1. Path to and including csproj, ex: "C:\infopathForms\myIPFormProj\myIPFormProj.csproj”
      2. language value could also be VisualBasic, if you have create a VB project.
    4. Add the attribute scriptLanguage="managedCode"as the first attribute of xsf:applicationParameters/xsf:solutionProperties
    5. Save your changes
  6. Open template.xml in a text editor and make the following change
  7. In your Visual Studio project, right click on InfoPath Form Template folder and choose Add >> Existing Item.
  8. Navigate to your ClientSource directory
  9. Change the object type dropdown to ALL Files (*.*)
  10. Select ALL the files in the directory and click ADD
    1. NOTE: you want to bring in all the files so that you bring in all your data connections, resource files, view styles…
  11. In Visual Studio double click on manifest.xsf
  12. When/If prompted to save changes and publish, blah blah blah… click OK
  13. Build your project

That’s it…

Thursday, April 16, 2009

Sync with SharePoint calendar causes Outlook to crash

This issue is caused when there is an "Exceptions to Recurring Event"

Root Cause:
Older calendar items brought over from SharePoint 2003 that had exception on the recurrence.

Workaround:
Delete all the calendar items that have an "Exception to Recurring Event", except Recurring Events that have an Exception and are Prefixed with "Deleted:" Like as follows:

clip_image001

NOTE: you must follow the instructions below to delete the items with the exception. If you try to delete the items without the instructions below you will get the following error.

clip_image002

How:

  1. Create a view that groups by Recurrence
  2. Look for items where the Recurrence icon has a slash through it
    listitems
  3. Click on the items edit menu and select Edit Item
    clip_image004
  4. The Recurrence section should look like the following (it will have Custom selected)
    clip_image005
  5. Select Yearly, you will be prompted by SharePoint
    clip_image006
  6. Click Ok
  7. Click Ok on the EditForm.aspx page and you will be prompted, again.
    clip_image007
  8. Click Ok
  9. Open the items menu again and select Delete Item
    clip_image008
  10. If you are prompted to send the item to the recycling bin, click OK
    clip_image009
  11. Repeat these steps for all items that have an exception to a recurring event.

If you have cleaned up all the corrupt items, you should be able to sync your SharePoint calendar to Outlook .