A folder with the name "" already exists error in custom list form of a sharepoint discuission board
Thursday, February 09, 2012 5:55 AM
i have a discussion board to be customized as per the requirement. So, i have created a new insert.aspx page and added a custom list form webpart to that page. And i imported my discussion board's NewForm.aspx into that webpart.
When i insert my first item using the insert.aspx with the subject "car for sale at newyork", it got inserted perfectly. And the momemnt i think "All is well", i tried to insert another item with the same subject "car for sale at newyork", i realise that "nothing is well", because it gives me an error "A folder with the name car for sale at newyork already exists". If anybody undergone with the same issue and got the resolution, please help me in this issue.
Thanks in Advance...!
Wednesday, February 15, 2012 10:05 AMModerator
Find a similar post related to this topic.
I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.
TechNet Community Support
Tuesday, February 28, 2012 9:30 PM
The following two forums include good information regarding to customize supportings file for Discussion Board
Two posts by Dalibor K include details on how to develop custom NewForm/EditForm pages.
Deleting the ListFormWebPart causes headaches in 2007. The DataFormWebPart alone can have issues functioning correctly. Without the ListFormWebPart you could have issues with setting the supporting files for the site.
You might get Invalid URL errors.
You might have issues with getting redirected to the root of the site.
You might have issues with a slew of other things.
To summarize, don't delete the out of the box web part. That knowledge/suggestions came from some of the original blog posts that are still around. You should close and hide the ListFormWebPart via the web part properties. You can right click on the OOB web part and click Web Part Properties. Under the layout heading you will see a couple of check boxes for hidden and close web part if I recall correctly. Chose those two options and then insert a custom list form under it.
We made some attempts to fix this by preventing users from being able to delete the ListFormWebPart post SP2 in SPD2007. You can still cut it from code view but highlighting the web part and trying to delete it via design view should not work any more.
If you take a look at the URL when you're creating a new discussion item it should look something like this:
The ContentTypeId url query string is what tells the single NewForm.aspx what to render. The ContentTypeId above matches my Discussion content type.
Next, if you take a look at the URL when you reply it should look something like this:
This also has a ContentTypeId url query string. It corresponds to the Message content type.
You can modify the appropriate content type as was suggested to allow you to have certain columns available only for Discussion content types and for Message content types.
The Discussion content type = The first post that creates the discussion topic.
The Message content type = Replies.
If you wanted to do a lot of customizations to the form and needed to use the DataFormWebPart (Custom list form) you could insert two DFWP on the page and then leverage the URL query strings to display only 1 web part.
You could also create multiple forms and try to set supporting files for the two content types. Here is the XSL trick for getting that to work.
1. Find out the id's for each content type by clicking "New/reply" on the list. In the URL, look for the ContentTypeId and the value it's set to.
In this example, it's set to 0x01002F0B85EC9C1DF64597568D219570A466.
1. On the NewForm.aspx, insert a Custom List Form for each content type.
2. On each Custom List Form, bring up the Common Data View Task Pane and click Parameters. Add a parameter called "contentType" and set the parameter source to be "Query String" and the query string variable to be "ContentTypeId".
3. For each Custom List Form, go into code view and put an <xsl:if> statement around each call-template, so that it only displays if the current ContentTypeId is
its own. Like so:
< xsl:if test="$contentType = '0x0107'">
< xsl:call-template name="dvt_1"/>
Now, when a user clicks "New", indeed, it will always go to NewForm.aspx, but the Custom List Form that actually displays is based on the ContentTypeId. So, the Custom List Form that is shown is valid, and the others are hidden.
The easiest option is to just go to the list settings and modify the appropriate content type and just keep everything as is.
In case above is not enough to resolve the issue, please consider open a support ticket with Microsoft -
The option you will need under this would be the Advisory services option, you also have the option of finding a Microsoft Gold Partner to work on this for you.
However, other members of the community may still have encountered the issue you're seeing, and have a solution to offer!
Jing Wang | Microsoft Online Community Support
- Edited by Jing Wa - MSFTMicrosoft Employee Tuesday, February 28, 2012 9:31 PM