Tag Info

Hot answers tagged

8

Well, basically because in your CAML declarations you are performing three different operations. Let me explain this in a simpler way. You first define the field as Site Columns in your element file (sample shows the declaration of one of the OOB field): <Field ID="{8c06beca-0777-48f7-91c7-6da68bc07b69}" Name="Created" ...


7

You need to move the list Url to your module definition: <Module Name="Style Library" Url="Style Library" RootWebOnly="true"> for GhostableInLibrary to work properly. You should of course then remove it from the File Url, since it is now defined on module level. If you have no Url in the Module tag you can only use type="Ghostable" on your File ...


6

Property bag is a collection, intended to hold your application's configuration data. There is a collection present at each SharePoint site. So in each SPWeb Object, you can use the collection theSPWeb.AllProperties the same way you use a hash table. For example: spWeb.AllProperties["newValue"] = "OH SharePoint, you so buggy!";


5

You can reference an external js file like: <CustomAction Id="Ribbon.Library.Actions.Scripts" Location ="ScriptLink" ScriptSrc="/_layouts/DocumentTabTwo/Button2.js" /> This will ensure the functions from the file are accessible from your CommandUIHandler


5

You should have Type="GhostableInLibrary" attribute for your preview. I suppose MasterPages in your solution points to a document library. If you want to provision files from a module to a document library, ghostableinlibrary type must be used: Specifying GhostableInLibrary means the file will be added to a document library in SharePoint together ...


4

Turns out I had made a wrong assumption. I thought the formula used the internal name of the field, but it actually uses the DisplayName. So either changing DisplayName to TestDate or changing the formula to TEXT([Test Date],&quot;MMMM&quot;) will fix the problem for me. It caught me out for so long because I had copied the fields out of an exported ...


4

All the ribbon definitions are stored in this file: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\GLOBAL\XML\CMDUI.XML Action JS code for most of these ribbon elements you can find here: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\SP.Ribbon.debug.js Actions for ...


3

Property bags are powerful and good way to store properties and static details that is used in SharePoint. The Elements.xml file is used to define the property bag elements for the particular feature. Its something similar to entering key value pair configuration into your web.config file, for use within the application. Please find this detailed blog for ...


3

I totally agree that this is inconsistent and a bit misleading. Assuming that tranforming the solution to the Sandbox is a none starter, a few thoughts... You could maybe re-scope the feature to the Web (I'm assuming that it is currently the scoped at the Site) and the just activate it on the root web. That would probably raise another issue though as I ...


3

From the below blog, you can use the following code... SPList docs = w.Lists["Documents"]; SPFieldLookup fl = (SPFieldLookup)docs.Fields["City"]; fl.DefaultValue = "1;#Mexico City"; fl.Update(); http://blogs.msdn.com/b/varun_malhotra/archive/2008/06/19/how-to-set-the-default-value-for-a-look-up-field-for-an-item-as-it-is-being-created.aspx


3

Everything works fine, I've even created a test project for you: http://www.4shared.com/zip/EwqRtH6c/ScriptLinkTest.html. Look at it. Did you check your js file is loaded correctly on the page?


3

Evgeny, If this is a lookup to the list it self (i.e. you want to select elements form the same list, like related news articles) you can set the list property to "self". <Field Name="LookupToPages" ID="{3B5B07A0-68DB-4BF6-AAAE-87B77CE430C6}" Type="LookupMulti" DisplayName="Related News" Group="Intranet.ContentTypes" ...


2

%22 is code for quote ("). This is because you forgot to add a starting quote. I mean, if, for example, web.Url is equal to http://localhost, final html will be: <a href=http://localhost/Lists/Jr/AllItems.aspx">J & R</a> This html is not correct, so sharepoint "fixes" it, replacing " with %20. You should provide starting quote as well ...


2

This can be accomplished by duplicating the CustomAction xml section. Just copy the entire custom action section and paste below 1st CustomAction xml section and change RegistrationId to the next RegistrationId you want it to show up in.


2

What you're really looking for, is SharePoint 2010 Fluent Ribbon API. It is a Codeplex project, which simplifies work with ribbon. It has in-depth documentation, including huge amount of samples and screenshots. The only bad thing about this solution, is that you should rewrite your XML ribbon definition to FluentRibbon ribbon definition. But code ...


2

As a general rule, XML attributes aren't designed to have more than one value. Interestingly, the attribute seems to be optional, so it may be possible to apply it to a great many places at once by leaving it out (probably too many). My only other suggestion would be to do a good old fashioned copy-paste and have one CustomAction element for each ...


2

It's a warning. It's simply there in case you didn't mean to have this configuration. i.e. you've added to the feature you want it in but didn't remove it from the feature it got added too by default. I've successfully deployed and used solutions that gave this warning while packaging The solution won't let you package if you're going to have two elements ...


2

If this was VS2008, I'd create my receiver class in my project (standalone .cs file) that inherits from the right class and implements whatever it needs to do, and just wire up the two separate Elements.xml files from the two features to use the class by assigning the correct ReceiverAssembly and ReceiverClass properties. You can probably do something ...


2

If your parent Content Type is already being used, it will not be removed when you do a Deactivate/Retract/Deploy/Activate cycle, as is done by Visual Studio. I think it's normal that SharePoint complains. Try doing just an Update-SPSolution from the SP2010 Management Shell? Alternatively, package your 2nd content type in it's own feature and activate only ...


2

You have the Id of one group set to Ribbon.CateringService.TourenplanView.Calendar.Remove, but the scaling elements points to Ribbon.CateringService.TourenplanView.Calendar.Delete. Remove vs Delete!


2

Copy the following XML into Feature's Elements.xml and try to play with params. The location is CommandUI.Ribbon.ListView <?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <CustomAction Id="ShowHelloWorldButton" RegistrationType="List" RegistrationId="100" ...


2

It seems that you are using wrong identifiers for the three fields Title, LinkTitle and LinkTitleNoMenu. The correct ones should be: Title --- fa564e0f-0c70-4ab9-b863-0177e6ddd247 LinkTitleNoMenu --- bc91a437-52e7-49e1-8c4e-4698904b2b6d LinkTitle --- 82642ec8-ef9b-478f-acf9-31f7d45fbc31 I have tried to search for the guid you are ...


2

I always have added custom links to the suite bar using a small jquery script on the page On SharePoint 2013 you can do that using this code <script type="text/javascript"> var suiteBar = $("#suiteBar").find(".ms-core-brandingText"); suite.html("<a href="www.google.com"> custum link </a>"); </script> If you are using Office 365 ...


2

You can specify QuickAddGroups in the Elements.xml like this: <File Type="GhostableInLibrary" Url="AuthoredListFilter.webpart"> <Property Name="Group" Value="$Resources:spscore,FiltersWebPartGroup;" /> <Property Name="QuickAddGroups" Value=";#Filters;#My Site: Middle Right;#My Site: Middle Left;#My Site: Bottom;#" /> </File> ...


2

Site columns in content types is a great way to group several columns in a meaningful (and reusable) way, and then attach the content types to the list. Having said that, you can define all the site columns in one file (Say SiteColumns.xml) and user FieldRef to reference them in your content types (say ContentTypes.xml). You can always ensure to activate ...


2

You need to append 15 to _layouts i.e /_layouts/15 in order to get hold of the file as you are working on SP 2013. UPDATE Put the javascript file under CustomRibbonButton folder in your project and use /_layouts/15/CustomRibbonButton/JavaScript1.js. The hive folder for SharePoint 2013 is 15. It used to be 12 for MOSS and 14 for SP 2010. This needs to be ...


2

There is another option how to add Event Receiver to a specific List - add the Event Receiver to the Content Type. Steps: Create custom Content Type for a List Add the Event Receiver to the Content Type Add Content Type to a specific List in order to register the Event Receiver In that case you will be able to control on which List an Event Receiver ...


1

Try this : <!-- Parent ContentType: Document (0x0101) --> <Field ID="{01854464-EABC-4726-A517-397A4EA224C2}" Name="dueDate" StaticName="dueDate" DisplayName="due Date" Description="dueDate" Group="MyDoc Content Types" Type="Calculated" Format="DateOnly" ResultType="DateTime" ReadOnly="TRUE" > ...


1

changes apply on any other fields except this Primary key !!! field because it is a reference. But before create this list, it is possible by change with new content type that you should create new one in your site application then correct GUID's for Title --- fa564e0f-0c70-4ab9-b863-0177e6ddd247 LinkTitle --- bc91a437-52e7-49e1-8c4e-4698904b2b6d ...


1

Kind of workaround, but still: deploy CQWP without this property to a page, set the property programmatically, and then export webpart to .webpart file. I anticipate some kind of double HTML encoding nightmare like as a result. P.S. Not tested. P.S.S. If you will not be able to export the webpart from browser, try using programmatic approach ...



Only top voted, non community-wiki answers of a minimum length are eligible