Unable to expose existing control on a new project form - templates

TFS 2017 on-premise Version 15.117.27024.0
I have a custom Work Item field which exists as a global field, and has been added to work item templates in other projects on the same instance without issue. I've added the custom field to the User Story template for a new TFS Project (which uses the same TFS project template as other projects), and added it to the layout under the 'Value Area' control. Whatever I try, I cannot get the field to show in the web UI of TFS, but when I preview form using the Visual Studio Process Editor add-in, the field shows.
I've tried moving the control into another group, a different column, re-ordering the controls in the column, cleared cache, tried incognito, tried another users machine who has access to the same project. When the other user edits the template, he can see my new field in the template editor.
Exported the XML for the WIT using witadmin, and the elements are there as expected as a Field and as a control in the correct group & column.

In TFS 2017 and higher versions the fields should be exist also in the <WebLayout> to be displaying in the TFS web interface.
In your case the field exist only in the <Layout> so you can see him only in Visual Studio.

Related

SharePoint 2013: Using StratusForms I deleted "NewForm.aspx", now only the new "NewForm" will not work

Tools: SharePoint 2013, SharePoint 2013 Designer, StratusForms
What I was doing: StratusForms - Modify SharePoint's Default Forms with HTML Templates (https://www.youtube.com/watch?v=oai-m_KyzMc)
Status: DispForm and EditForm currently work, NewForm did work until the incident.
Incident: I deleted the main webpart on NewForm and the form was hosed, so I deleted NewForm.aspx. I recreated the NewForm.aspx and also added it to forms library (https://sharepoint.stackexchange.com/questions/108467/accidentally-deleted-default-editform-aspx). Like before when it worked, I added a Content Editor webpart and pointed it to my StratusForms template, but it did not work . The controls/boxes did not show up. It worked before on the old NewForm, and it currently works on DispForm & EditForm.
Question: Given the above information does anyone know why, or better yet have a solution, to get NewForm.aspx working with StratusForms again?
Thank You!
So the underlying issue was SharePoints internal linkage of it's 3 forms (DispForm, EditForm, NewForm) to the data sources.
So those out-of-the-box forms are not like the ones we create. Even though you create a new "NewForm" and it may look like the old default NewForm, but it is not. There is metadata like Microsoft.SharePoint.PAGETYPE, which tells if it is a custom form or new, display, or edit form.
The resolution was found in this article (http://www.sharepointblogs.be/blogs/vandest/archive/2011/03/11/troubleshooting-issues-with-dispform-editform-and-newform.aspx).
In case the link breaks I have also included the manual method here:
Manually
It's easiest if you take a corresponding form from another SharePoint List in the site and export it (SharePoint Designer) or just copy it to a text editor. This way, most of the settings of the List Form Web Part are already correct
Generate a new GUID and fill that in for the __WebPartId [uppercase & just change a few chars/numbers] and properties [lowercase, same as WebPartID & has a g_ prefix] of the List Form Web Part markup. It has to be the same GUID but the formatting is different. See the above screens for samples
Update the property with the List ID you're targeting
Verify all other properties of the List Form Web Part and save the file as either DispForm.aspx, EditForm.aspx or NewForm.aspx
Import (SharePoint Designer) the page (or paste contents from the text editor)

How do I add a new Razor Page Template to Visual Studio in ASP.NET Core 2.1?

I've got the Templates folder in my project hierarchy, and I've been modifying those pretty heavily to speed up my scaffolding workflow.
However, some of the objects in my database must persist forever. So, since they can't be deleted, they have a boolean activation state.
As such, I'd like to add two new actions to the CRUD workflow, Deactivate and Reactivate. I added the relevant templates to the Project\Templates\RazorPageGenerator folder, but when I click to add a new Razor Page, it still only shows the standard CRUD options.
I'm not sure where I need to register the new templates for them to be usable in the scaffolding operations...?
This is what I normally do and works all the time:
Right click the folder => Select Add > New File => Select Razor Page and modify the "Name" section to match my controller method name.
If it doesn't work for you, how about creating files "Deactivate.cshtml" and "Reactivate.cshtml" using normal means (Finder in MacOS, Window Explorer in Windows, or command prompt), copy them to your Project\Templates\RazorPageGenerator folder, and add them to your project by right click the folder in VS2017 => Select Add > Add Files from Folder
In .csprog change Project Sdk From Microsoft.NET.Sdk To Microsoft.NET.Sdk.Web

Add Related list to customized Edit Form in Sharepoomt 2013

So I am trying to update a site from 2010 to 2013. The site has a list called vendors and a library called Invoices. Invoices have a lookup column on vendors. The Invoice edit page was customized in SPD 2010 in two ways:
The ListFormWebPart was hidden and a custom DataFormWebPart was added to let the user edit the metadata of the invoice.
A related List View was added so that users could see a list of invoices for the vendor being edited.
After upgrading the site to SharePoint 2013, the fields on the DataFormWebPart do not get rendered. If I remove the hidden ListFormWebPart, then The DataFormWebPart display its fields ok, but the related list shows nothing (the related list must get filtered using the ListFormWebPart).
I tried to recreate the scenario in a new SPWeb from scratch in 2013 and got the same results (I could not have a customized DataFormWebPart AND a related list view on an edit form.)
Is there any way to get this to work in 2013 as it did in 2010?
I’m thinking I could replace my related list with some JavaScript to pull the Invoice info and display it, but I am hoping there is an easier workaround.

Attach file option is not available for Discussion Board list items in SharePoint 2013

I could not find any option to attach a file with 'Discussion Board' list item in SharePoint 2013. I have confirmed from Advanced Settings of this list that 'Attachments to list items' option is enabled.
There is a change in SP2013 and you cannot add attachment to the item the same way as in 2010. In SP2013 you add an attachment directly to Body field using option in Ribbon (Insert | Upload file).
When uploading a file, by default, files will be stored in SiteAssets library, however you can choose different one if you want.

How can you edit Sitecore desktop shortcuts?

Anyone know how to edit the name of the Sitecore desktop shortcuts? I'm using the Advanced System Reporter module, and creating a desktop shortcut from there, but now I can't change the name of the item.
I know that you can right click on the Sitecore desktop shortcut and choose properties so change the information of the link....but how can I change the name of the shortcut?
The properties have a field 'Name', that even when I change it, the shortcut doesn't change (even after a desktop refresh).
I tried changing the 'Link' field on the properties as well, but then the link disappeared.
Do these exist in the core database somewhere? Can I get back the one that I just lost (by changing the Link field)?
Through further research, I found that for normal links, the name can be edited by right clicking the link, selecting 'Properties' and changing the 'Name' field.
Unfortunately, Links generated through the Advanced System Reporter don't update on the desktop when this Name property is changed.
It seems that the links for these desktop shortcuts are a combination of items in the core database and values in the User profile in the aspnet_profile DB table (also in core, but only viewable through SQL).
This value is stored in the PropertyValueBinary field, which, as the name suggests, is all in binary, and can't (or shouldn't) be edited.
One way around this is to:-
Create the desktop link, which will be called something by default (i.e 'SalesReport').
Open up the core database in Sitecore, and navigate to /sitecore/content/Applications/Advanced System Reporter/Links. Then find the folder for your username.
Find the item that was created for the link (in this case it'll be 'SalesReport'), and change the value of the field 'Display name' to whatever you want the link called (i.e 'Sales Report for May'.
Note: You may want to change the name of the item as well, so that it won't get lost in other desktop links created in the future and will be easier to find later. In this case you will need to:-
Go back to the desktop, right click the shortcut and choose Properties.
Manually change the end of the 'Link' field to the name you want to call the item (i.e change it from 'SalesReport' to 'Sales Report for May'.)
When you click OK, the shortcut will disappear. This is expected.
Open up the core database in Sitecore again, and find the item you're changing. (i.e /sitecore/content/Applications/Advanced System Reporter/Links/SalesReport
Change the name to exactly what you changed it to in step 2.
The link will reappear on the desktop, it'll have the correct name, and will be easy to locate in the Sitecore DB in the future.