Tag Info

Hot answers tagged

6

I'm assuming you provisioned the column as a site column. The next thing is to make sure to push the changes to the down to lists and content types where this site column has been referred (which apparently you haven't done it). So, I would recommend to delete the old definition and provision the column again! See an example below where I am using the ...


4

If you want to customize a list new\edit\display form there is a couple of ways you can do it. I mean programming ways (not InfoPath). All this methods related to creating custom rendering templates. Every list form has its own rendering template, for list its a "ListForm", for document library "DocumentLibraryForm". All this templates (and otheres) listed ...


3

You can use jQuery to change the behavior. This is based off something I did 2007, but the same should hold true in 2010. It appends a target=blank attribute to any a href that ends in .msi. You'd just need to change the selector to the proper attribute for the lookup field. <script type="text/javascript" src="/Resources/jquery.js"></script> ...


3

Trying to change the display name of the Title is going to be an uphill struggle: There are several versions of the same column, each with their own DisplayName (some of which are created in the list). If you open your list in SharePoint Manager, you'll see the various hidden Title fields. My advice would be to hide the title field (Hidden="TRUE" in the ...


3

You could edit the DispForm of the list item and in it have a delegatecontrol (or some other custom control) to count how many times the page has been loaded by unique user id's other than the authors id. Update Create a new user/web/delegate control and insert the following code: var web = SPContext.Current.Site.OpenWeb(); var list = web.Lists["Name of ...


3

You can parse the ID parameter from query string in Dispform.aspx, once you have the ID value you can update "Add new Item" link and pass ID from DispForm.aspx. Please refer to Parse Query String from Javascript to parse URL and get value from Query String.


3

You could also use _api/Web/Lists/GetByTitle('List title')/DefaultDisplayFormUrl If you want for all lists do _api/Web/Lists?$select=DefaultDisplayFormUrl Note that the property is not visible when visiting List directly, need full path or $select.


2

You can create as many DispForms as you'd like for a list. In SharePoint Designer, copy the existing Dispform and rename the copy. Hide the default form on the page by setting the IsVisible and IsIncluded flags to false. Then add in a Custom List Form web part. Customize as desired based on your requirements. Then through navigational control and or ...


2

Are you changing the Supporting Files for the list in the properties? Don't forget that you need to select the right Content Type (usually Item or Document).


2

[There was a not useful answer] UPDATE: OK, I understand the problem now. In my case the field is present in the section (I've removed other fields for simplicity): <DataFields>@MultiLookupTest_x003a_TestField,MultiLookupTest:TestField;</DataFields> And then you can render it just in the same manner as others but you need to use a part of ...


2

You have misunderstanding of using CustomActionGroup. It uses for creating groups not in ribbon, but in sharepoint pages, for example in site settings. Chris O'Brien has written good blog posts about ribbon customization here. And if you have doubts how to create ribbon button or group, it is good idea to digg into cmdui.xml (this file contains definition ...


2

The code you posted should work also for old lists, as it uses the Update(true) method. There is only one case I can think of, when pushing down changes from the parent Content Type to the child Content Type does not work: when the content type is either read-only, or sealed. Please read this site for more info. Please let me know if that helped you. ...


2

I think you might be missing the fact that you need to update the CT after you have updated the field, also I normally don't declare the C as var but rather a CT. See the code below: (Also make sure the internal name "C" is unique to that field and not mixed with a required field in another CT.) Best of luck SPContentType ct = web.ContentTypes["CT"]; ...


2

Using jQuery, find the nearest item with a unique identifier. Not all fields in a form have unique IDs, as you found with the date fields, which all have the id="SPFieldDateTime". The corresponding label column, however, contains the field name and this one must be unique. Use this as your hook. You can then go to the sibling of the unique element with ...


2

In SharePoint 2010, the default display forms include an anchortag in the table rows with a name attribute of: SPBookmark_YourFieldName If you are using those default display forms, you can take advantage of this and locate your values using jQuery like the following. In this example, my date field is named 'SiteCreateDate': // my example list field is ...


2

Depending on your settings, the newform.aspx page will either open in a dialog (iframe) or open in a new page. Here is how I address this issue in my SPELL library: I don't pass the ID in the URL, but instead I run a script on newform.aspx that follows these steps: When the new form opens, check the parent window if the parent exist (dialog), then the ID ...


2

It is simple like this. SPUtility.GetSPField('City').Hide(); Please refer this question to show how to apply it. Edit: As far as you are concerned not only on the displaying and having high security concerns over the security of data, you better try something like creating another list with a one-to-one mapping. Then add a lookup column from first list ...


2

Use DefaultDisplayFormUrl at the time of loading the list in Javacript client object model. Example: var clientContext = new SP.ClientContext.get_current(); var list = clientContext.get_web().get_lists().getByTitle(listTitle); clientContext.load(list, 'DefaultDisplayFormUrl'); Then while enumerating the listitemcollection use get_defaultDisplayFormUrl() ...


1

Yes, you can do this by SharePoint Designer. Add a lookup column to the Orders list, which will refer to the Customers list Open Customers list in SharePoint Designer Edit Customers Display Form, from the toolbar, select Insert a "Related Item View", your Orders list should show up in the option list, choose it Add/Remove columns of the Orders view You ...


1

I found the answer my self. I would like to share it with you:) Open the AllItems.aspx page for the specific list. Search for the tag List item LinkToItem="TRUE" to whichever column you want the link: < ViewFields> < FieldRef Name=”Attachments”/> < FieldRef Name=”LinkTitle”/> < FieldRef Name=”linkThisColumn” LinkToItem=”TRUE”/> ...


1

You must use SPFieldLink class to get the order of fields in content type see the link. To get all fields from Display form you need get all fields from content type that not hidden. var contentTypeCollection; var contentType; var fieldLinks; function getFieldLinks() { var clientContext = new SP.ClientContext.get_current(); if (clientContext != ...


1

Try using the getTagFromIdentifierAndTitle method to get this value rather than using jQuery's element selector. The reason being is SharePoint writes some funky code for it's aspx pages and if you are using SharePoint Designer's form fields, this code will most likely find the element you need. Give it a try to set your variable and then extract the ...


1

I followed Daniel advice and used ".ms-formlabel h3.ms-standardheader" which solved my problems.


1

As you already discovered, one way is to use the DelegateControl approach (with PlaceholderAdditionalPagehead) and that's in fact what I've been using for a couple of years now. The key is how to access the built-in editform.aspx/dispform.aspx pages with the embedded WebPart showing the SPListItem. That's done by hooking your WebControl into ...


1

Create a base class for your web parts that handles exceptions. That way the page doesn't fail, just your web part. The error message is displayed on the page where your web part should be, the surrounding web parts are rendered normally. I use this as the base class for all my web parts. ...


1

Stefan Bauer wrote a post about this that covered it quite nicely! I know the question have been answered but this post, in combination with this question, helped me to solve my task! http://www.n8d.at/blog/hide-fields-from-lists-and-content-types/ The Essentials: # First load SharePoint Core Assembly ...


1

Since you mentioned that the Customer2 list was created from the template. If the list which was saved as a template has any look up columns during the save as template they will break - so In the customer2 list you would have to delete the lookup columns and recreate them again.


1

This is the best example I've found for this http://www.estruyf.be/blog/sharepoint-2007-create-permissions-on-list-views/


1

The problem appears to be with reuse of the SPWeb (wrapped in SPContext) used by ItemContext and RenderContext I had a number of different problems including the one here, they all finally went away when I created my own SPWeb every time I need one. using (SPSite site = new SPSite(list.ParentWeb.Url)) { using (SPWeb web = site.OpenWeb()) { ...


1

I normally hate "Why" answers, but here goes: WHY? The Edit Form is for modifying the properties of a list item, or a library item (document). The Display Form is for showing (read-only) the properties of a list/library item. If a user is looking at the item properties in read mode, they can click the link and get the document. If the user is in edit mode, ...



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