Hot answers tagged

8

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


8

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.


4

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


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


4

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


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

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 need to use the substring options available in XSLT to get what you want substring-before and substring-after. Like this: <xsl:value-of select="substring-before("&le;/a&gt;", substring-after("*&quot;&gt;", @Betrieb))"/> Not fully tested, the encodings might be off for the greater than, less than, and double quote characters. ...


2

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


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

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

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

Using JavaScript you can change the URL query string Source and place the DisplayForm http://spjsblog.com/2011/04/23/redirect-from-newform-to-dispform-or-editform/#comment-195397


2

Take the last backup and restore it to a new site collection. Make a granular backup from central admin on the calendar list. Restore the granular backup calendar to your lost calendar.


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

Sorry for replying with answer after long time. I wondered when I saw there is no answer to this question. So decided to do self-reply to this question. After lots of brain storming I get to know there was silly mistake I did in feature receiver. When I debug application I come to know that I was getting null values from site column properties. Then I placed ...


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

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

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


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


1

Why don't you add a Content editor web part on dispform.aspx and try adding the video play (code) there instead? You can always add a Web Part to the list forms.


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

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

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


1

Yes. You can create a print view of your form with no color in it. Then when you click a "print" button, it will switch to this view and then they can click their print button or press ctrl+p to print.


1

The parent SPMobilePage has a Response property which can be used to directly inject markup into the response stream. So in this case in my OnLoad() method is simply find the parent and then add the processing instruction markup: protected override void OnLoad(EventArgs e) { base.OnLoad(e); SPMobilePage parent = this.Parent.Parent as ...



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