Tag Info

Hot answers tagged

5

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" ...


5

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 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

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 ...


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 ...


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 ...


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


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

%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

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

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

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

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

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" ...


1

Evgeny, I recommend you utilize an event receiver if you're provisioning the list or content type through a feature. In short, what you need to do is to create the lookup column on the list, get a field link to the new column, and then add the field link to the content type attached to the list. Something like this should do the trick, provided you have ...


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 ...


1

You do need to use some extra settings for HTML fields and the like. So, for a multi-line HTML field is uses something like: Type="HTML" RichTextMode="FullHtml" RichText="TRUE" Here's one from an old project <Field Type="HTML" ID="{3b3c593c-06d6-4a4d-adc8-90d71a895b05}" Name="FieldName" DisplayName="Field Display Name" Group="My ...


1

You can use somethig like this code in client object model for item property update function UpdateSelectedItemProperty(internalFieldName, propertyValue) { var context = SP.ClientContext.get_current(); var web = context.get_web(); var selectedItems = SP.ListOperation.Selection.getSelectedItems(context); var selectedListId = ...


1

This will not work because Sharepoint will eventually put every list item in the same table in the database. The order item will not be added since an item with ID=1 already exists. (the customer item). It is not recommended to add list items this way, and as suggested above you could use a feature event receiver to add items instead. If you would like to ...


1

Did you try to use Required="True" in both Field and FieldRef element also? Try the example below: Elements.xml <?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <Field ID="{DF8D882A-8C54-4E8A-BB60-8D49D0B2E116}" Name="Summary" DisplayName="Summary" RichText="TRUE" ...


1

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 ...



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