Tuesday, April 29, 2014

Custom Content Type Deployment Tip for Visual Studio 2010

Scenario: You add a custom content type to your Visual Studio 2010 project. Because you have been bitten by the lowercase Content Type ID problem before (see here: https://connect.microsoft.com/VisualStudio/feedback/details/709500/visual-studio-2010-sharepoint-project-template-content-type-generated-through-visual-studio-has-id-guid-in-lower-case-causing-custom-actions-to-fail ), you quickly turn the Content Type ID to UPPERCASE using the handing Ctrl+Shift+U shortcut. You are pretty much a shortcut badass. Visual Studio 2010 generates Content Type ID’s lowercase by default.

Visual Studio gives you:
<ContentType ID="0x010059b2dab8444144e68f7f9baaa134dbf0" …
..so then you upper-case it to:
<ContentType ID="0X010059B2DAB8444144E68F7F9BAAA134DBF0" …
…to ‘avoid’ problems.



Problem: When you try to deploy your solution, you get a ‘Value is out of range’ error. No logged info beyond that. Helpful as always.

Solution: See the ‘X’ near the beginning of the Content Type ID? It MUST be lowercase. When upper-casing it, you may accidentally uppercase that character too. This totally explodes whatever parsing is done on that ID when it is read from the schema file.

And then you fix it:
<ContentType ID="0x010059B2DAB8444144E68F7F9BAAA134DBF0" …
 
Wednesday, April 16, 2014

SharePoint 2013 Chrome Control Parameters List

I had a hard time Google-Binging this information – so here is what I dug directly out of the source:

Param Name Description
siteTitle The title of the site.
siteUrl The url of the site. [This is easy!]
clientTag ? Tag the page ?
appWebUrl The current app web url.
onCssLoaded Callback function for when chrome control is done loading. [Great naming there!]
assetId ? The app’s id in the catalog ?
appStartPage Start page of app web. Need to test this…
rightToLeft For those languages that go against the grain.
appTitle Title of the app. [Back to easy street!]
appIconUrl The url of the app icon.
appTitleIconUrl Titles need icons too.
appHelpPageUrl The url of your very useful help page.
appHelpPageOnClick Use this to alert(‘No help 4 U!’)
settingsLinks Array of links to put under the ‘options’ wheel.
language ¿QuĂ© diablos?
bottomHeaderVisible Hide the bottom header.
topHeaderVisible Guessing this may hide the top header. Since chrome control does so much to everything in addition to the top header [sarcasm], I can see never using this option.

 
© I caught you a delicious bass.
Back to top