Tag Info

Hot answers tagged

6

I guess it depends on how 'global' you really want to scope your global settings. I tend to think that a good boundary for your situation would be the web application. In that case, you could store your settings in the SPWebApplication property bag. From your global settings page, you would set the values, something like this //get a handle on the ...


4

I think this forum post on MSDN might be of some help: Add attachment column to copy of NewForm.aspx in sharepoint designer For your scenario, I think you can try to create a custom list form (create custom list form), and then you can use SharePoint control “Form Action Button” instead of the default “Ok” button in the custom list form: ...


4

You are creating a custom field type and control by the sound of it. So somewhere within the logic of your custom field control, you need to inspect the value of this.ControlMode This value will be an enumeration of SPControlMode and will tell you what mode the control is in. Use this to control what is rendered for the control in what mode. It would ...


4

The reason that it does not work is that you are overriding the Render() method. Remove that override and add the following to your CreateChildControls: this.Controls.Add(parentList); this.Controls.Add(childList); this.Controls.Add(box); If you do this then your controls will be registered in the control tree and get a valid control name. This ...


3

You can find details about <Mappings> in [MS-WSSCAML]: Collaborative Application Markup Language (CAML) Structure Specification V0.1 "MAPPINGS: A set of MAPPING string elements that represents a canonical, languageagnostic identifier for a corresponding CHOICE with the value specified by the MAPPING element. The reader MUST ignore MAPPINGS if the ...


3

@Marek is right in his assertion that you should use XSLT. However, in 2010 (only) there are functions you can override to alter a field's output: GetFieldValueAsText is used by most field types for rendering GetFieldValueAsHTML is used by Note fields and similar Each of these accepts an Object value input, which is either the raw data directly from the ...


3

you can use a custom xsl file that sets the disable-output-escaping of the column to "yes". This is explained in more detail in the following blogpost http://pholpar.wordpress.com/2010/09/11/external-list-example-demonstrating-net-connectivity-assembly-and-custom-field-type/ Summary: Open the display form of list in sharepoint designer Open the view you ...


3

The following are the high-level steps that are required to create a custom field type. To create a custom field control Create a public custom field type class, which inherits from one of the built-in field type classes, such as SPFieldBoolen, SPFieldChoice, or SPFieldText. Add two public constructors using specific parameter list signatures and forward ...


3

Create a custom list. Supply the choice in the title column. Save. Repeat as necessary. Create a lookup column in the desired list where the choices should be, point it to the Title column. Now users (I'd limit the editors) can add items to the first list and choices will appear (or disappear if deleted) in the second.


3

ows_ is the SharePoint out of the box field prefix. It has been around since the start of time pretty much, and even though it is used for SharePoint Team Services it has kept the OWS name (Office Web Server) and why such things as search still comes from office. [update - I know the answer was accepted but I thought I would put some history in here I dug ...


2

Well, there is a specific function for creating Discussions: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.utilities.sputility.createnewdiscussion.aspx and a similar one for replies: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.utilities.sputility.createnewdiscussionreply.aspx Have you tried looking at this in Reflector? ...


2

Unfortunately I don't know of any pre-made Custom Field Types (free or otherwise) that implement this kind of functionality. I'm not going to say such a thing doesn't exist, but I can't imagine there's much call for someone putting the effort to develop a solution that covers such a narrow requirement. I can tell you that such a thing is certainly ...


2

SharePoint 2010 renders fields on a list view is with XSLT style sheets, so there is no method to override. If you want a your own way of rendering on list views, you need to create a custom XSLT style sheet named fldtypes_*.xsl and deployed it to (14 hive)\TEMPLATE\LAYOUTS\XSL. How to: Create a Custom Field Type (paragraph 3. (Optional) Create a Custom ...


2

One approach might be Gunnar Peipman's - use reflection to bypass the SetCustomProperty field entirely. It has worked well for me a few times.You may need to serialize/deserialize data in these prope private void SetFieldAttribute(string attribute, string value) { Type baseType; BindingFlags flags; MethodInfo mi; baseType = typeof(MyCustomField); flags = ...


2

I believe sorting and grouping are based on the actual stored data. If you've got a Custom Field Type doing such things I imagine you're not storing data in a manner SharePoint would recognise (and hence will also run into similar issues with the obstinate DataSheet view). If you're overriding SPFieldLookup, I'd recommend trying to emulate the Lookup field ...


2

That's ultimately dictated by the FieldEditor user control you reference. Here's an example for a custom SPField I recently worked on: <wssuc:InputFormSection Title="reCAPTCHA Column Settings" Description="Specify your public and private reCAPTCHA keys along with selecting a theme and default language. For more information on reCAPTCHA and to obtain ...


2

Can you change the delimiter of the field type to something like a semi-colon? It would make it easier to isolate when the breaking should occur. You could then use a XSL Template like this: <xsl:template name="StringSplit"> <xsl:param name="val" /> <xsl:choose> <xsl:when test="contains($val, ';')"> ...


2

Having an "Object required" related to JS means that the script has an instruction at line such-and-such that tries to access a property or method on a variable that has not been assigned a value of type [object] before accessing. It's much like the NullReferenceException in .NET if that gives you a clue. Try using the Internet Explorer developer tools ...


2

I think here you will need, first of all, to understand, how the conditional formatting actually works. Conditional formatting in SPD is not more than a visual way to define Xsl property of XsltListViewWebPart and other standard webparts, which use xsl transformations. Xsl property contains custom xsl code, and links to standard SharePoint xslt files, like ...


2

I was also facing this problem and I analyzed with a decompiler tool the creation of a custom field type with an editor control. The problem is that when the new column of your field type is created a new instance is created after setting the property of the field (Mask in your case). That's why your values are getting lost. You can observe this behavior ...


2

I ran into this problem a few weeks ago and I found a very simple solution in the following post from Gunnar: SharePoint: temporary solution for GetCustomProperty and SetCustomProperty errors To see it in the context of an entire solution you can grab the source for my SharePoint reCAPTCHA solution from CodePlex: reCAPTCHA for SharePoint


2

In the end I have followed the direction proposed by Stuart and marked this still another SharePoint blackhole, so I have left any hope of using this CAML tag as last for now. During my research I had a look at many classes in the framework but I cannot find anything related to using the mapping "attribute", so I can only assume that it was an uncompleted ...


2

There are some third party solitions, for example SPListDisplaySetting from CodePlex (not sure it will work for SP2010 though). Another approach is to implement custom field type. You can find a detailed description here on InfoQ: http://www.infoq.com/articles/Dressel-Gogolowicz-wss-security Also, you can try to customize list view, as described in ...


2

From global settings, I understand the settings should be applied to all the instances of custom field type across site collection, web application or farm. For Site Collection level : You can keep the settings for custom field type in a list.You can retrieve these settings by reading the list in code behind. Also, You can fine tune permissions on a list ( ...


2

I have fixed this issue by adding the following field to the to the fldtypes_MyCustomField.xml file: <Field Name="CAMLRendering">TRUE</Field> My thinking is that this prevents SharePoint from trying to update the field to to the new-fangled 2010 rendering and just uses the old 2007 CAML rendering instead. I also found that updating other ...


2

As of today, Developing a sandboxed solution is the only way you can upload and run custom code in SharePoint Online and Custom Field Types are not supported in a Sandboxed solutions. So it is NOT possible. Check this white paper to understand what you can do with SharePoint online: SharePoint Online for Office 365 Developer Guide


2

One of the more annoying aspects of custom content types is that if you change a content type once it has been deployed, the redeploy of the updated solution containing the content type will not push those changes out to existing lists that use that content type. The changes will be correctly reflected in Site Content Types but not anywhere where that type ...


2

You normally should not access data in CreateChildControls() because the control itself may not be in a completed state yet. Referencing data should happen in the Load() event as the control lifecycle shows. More detailed info is available here. Assuming your custom field is based on one of the basic SharePoint controls, you should be able to access the ...


2

You can override some of the properties content type per content type (DisplayName, Required, etc.). This will allow you to reuse existing types. If replacing properties is not enough, you can create different fields, with different staticname, name and ID, but with same display name (could lead to confusion to user though). A last word, while it's not ...



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