Is it possible to create a custom CodeLens adornment? - codelens

Is there an ability to create your own adornment that can be displayed via CodeLens?
I did a quick search on the web but found nothing to indicate that creating custom CodeLens items is available. Is that the case?

It is not supported at this time, you can track this visual studio request https://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/5743423-provide-an-open-api-to-allow-us-to-extend-code-len

Related

Create Form Template from existing ones

Is there any way that I can create a template within forms to utilize for every user in the company?
For instance; let's say I have the Sales Order Screen (SO301000) and the Document Detail grid configured in certain way, that display different amount of columns than the default (either more or less columns).
For each user I want to use this template (and all the ones created) that I will apply when I add the new user.
I'l appreciate any guidance and help.
EDIT:
I provided answer for Form element ASP template below. Although reading your question again I think what you're trying to do would be more along the lines of automating grid column configuration. We call this feature Default Table Layout.
There's a feature request for it here:
https://feedback.acumatica.com/ideas/ACU-I-415
The feature has been shipped in version 2017R2 and is documented here:
https://help.acumatica.com/(W(1))/Main?ScreenId=ShowWiki&pageid=30f3229f-20f1-4055-9c03-e0fe3b37080d
Image copy of documentation page:
For ASP Form templates
There are two ways to work with customizations in Acumatica:
As a Customization Project, everything is done directly in Acumatica
instance through the web browser using the Customization Project Editor.
As an extension library (DLL file) compiled in Visual Studio which is then included in the FILES section of a Customization Project.
For method 1, I believe creating custom templates would be a bit of a hack and would not be officially supported, if someone knows otherwise please chime in.
For method 2, we ship the Visual Studio templates with the Acumatica Configuration Wizard (Acumatica ERP Installer).
Those templates are in the following folder:
My Documents\Visual Studio 20XX\Templates\ItemTemplates\Visual C#
The templates will be available for ASP.NET solution only. You can open Acumatica Instance Website as a solution if the website is already deployed:
When you open Add New Item dialog:
The Acumatica Templates will be available:
Those are standard Visual Studio templates so you can copy and re-use them to create your own. Microsoft documentation for creating user template applies and you can follow their guidelines. Note that working with Visual Studio and creating your own template is somewhat less user friendly than using Acumatica Customization Project Editor.
Acumatica T100 covers using Visual Studio to create customizations and would be a good starting point to learn the techniques involved:
https://openuni.acumatica.com/courses/development/t100-introduction-to-acumatica-framework/

SharePoint 2010 - Creating a custom document library template

I'm trying to figure out if it is possible to create a custom document library template for SharePoint 2010. When a user clicks on the Libraries link on the quick launch menu of a new SharePoint site, and then clicks the Create button, the Create dialog is launched.
I know this dialog window hosts a Silverlight control, but obviously there is a way to create custom template types in this window. There is even a category that is called Blank & Custom. I've tried copying and modifying the DocumentLibrary feature located in the following location - C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES, but that didn't seem to work.
Thanks for reading, I'm sure the answer is obvious but I've been stumbling over Google and MSDN all morning trying to figure this out but I haven't had any luck.
Well, unfortunately the answer is not that obvious. You'll have to create a new List Definition (a document library is actually a list). For that there are several ways, but as a developer, I guess the most common way is to do that through Visual Studio.
A basic tutorial that will guide you through the steps can be found here:
http://msdn.microsoft.com/en-us/library/ms466023.aspx
After you deploy your solution, a new list template (or document library, depending what you created) will show up in the dialog.
Yes, it is not that obvious at all.
Most of the Microsoft documentation is now based on using Visual Studio 2010 and are more focused on the lists than on the document libraries.
By the way, as told by Erwin, document libraries in SharePoint 2010 seems to have become lists, but the lack of documentation regarding the creation of custom lists remains anyway, so after having perform some successful trials I have decided to publish a step by step guide.
Sharepoint 2010 custom ducoment library

How can I capture event on adding item in Sharepoint Blog Site

I have tried Visual Studio Site Solution generator for building Sharepoint Site solution.
My requirement is to validate blog entries with some criteria at run time. I want to add the same Bad Keyword thing I had asked earlier.
But Visual Studio Site Solution generator is unable to create solution for Blog Site and showing below error
The Solution Generator does not support Site Definition of this type
Advice any other approch if available.
It worked for Discussion Board library and also the Custom Lists using ListDefinition. However, I am not able to do the same on Blog.
As Rubens Farias states you should use an event receiver, but I'll try and expand on the process.
You should write an event receiver to handle events that occur when you add or update blog entries. A blog site stores posts in a list based on a template named Blog Posts list (with a template ID of 0x0110).
Knowing this, I would:
create a new project in Visual Studio (using VSeWSS or WSPBuilder both will work)
add a class that implementsSPItemEventReceiver (this is the "event receiver")
override the ItemAdded, ItemAdding, ItemUpdated and/or ItemUpdating methods with your own implementation. You may not need to use all of these depending on your requirements and you should understand the difference between synchronous and asynchronous events
create a feature that registers your event receiver with the Blog Post list template (using the ListTemplateId 301).
To help you find out more about how do to go about the above steps, I recommend reading the following:
Event Fundamentals
Event Registrations
How to: Create an Event Handler Feature
Since Sharepoint is always list based, I can suggest to inspect SPItemEventReceiver.ItemAdded Method
As far as I know the Solution Generator makes a "best attempt" but because of the complexities involved, it doesn't always work. I prefer to use a tool such as WSPBuilder instead of VSeWSS for this reason, however it doesn't have functionality like the Solution Generator.
If you're looking for an improved blog engine for SharePoint, why don't you try Community Kit for SharePoint:Enhanced Blog Edition?
Use a custom Workflows and a custom Activity to do whatever it is you need done.?

Customizing Search Results Display in Sharepoint Services 3.0 Wiki

I'm looking at using a Windows SharePoint Services 3.0 wiki as a metadata repository. We basically want a community-driven dictionary and for various reasons we're using Sharepoint instead of say MediaWiki.
What can I do to customize or completely replace searchresults.aspx?
Features I'd add if I knew how:
Automatically load the #1 hit if it is a 100% match to the search term
Show the first few lines of each result as a preview so users don't have to click through to bad results
Add a "Page doesn't exist, click here to create it" link in cases where there's not a 100% match
I've got Sharepoint Designer installed and it looks like I'll be able to use it to upload any custom .aspx files I create but I don't see that it will give me access to searchresults.aspx.
Note: Since I plan to access this search tool from an external site via URL parameters it should be fine to leave the existing searchresults.aspx unchanged and just load this solution as a complementary search option.
Yes, everything is possible but you will need to customize it a little bit.
I would recommend you to build a custom web part to display your results. Here is a nice article to start with: http://msdn.microsoft.com/en-us/library/ms584220.aspx

Sharepoint: Deploy Custom Lists and New Columns in lists

I've created a custom list & also added a column in the Announcement List. Question is, how can I include those newly created items when I create a fresh Web Application (like a script, feature or something)?
Additional Info: It's like when you're to deploy from your development machine to a staging or production server. I'd like to have a script or something to update my production server to have the new column i've added to the Announcement List. Just like SQL Server's ALTER TABLE command to update a SQL Server Table.
Is there an equivalent in Sharepoint Lists?
TIA!
Regarding the new custom list, this can be done using features. See How to: Create a Custom List Definition for more information. The Visual Studio Extensions for SharePoint (VS2005 / VS2008) will help you to extract the list definition if you've created it through the SharePoint UI. If you are fortunate enough to be using a custom site definition and don't have any webs created yet, you can set your site definition to create the custom list using feature stapling.
If you are attempting to apply these changes to webs that already exist, you can still use a feature to define your custom list. It will just appear as a type of list that can be created. Then to have the custom list automatically created for existing webs or to modify existing lists such as the Announcements list, you can use a feature receiver. This allows you to run any custom code when the feature is activated. See the MSDN article Feature Events for more information.
Alternatively, you could not use features at all as they can be difficult, time consuming and painful. In fact, this blog post has a good argument against the idea. You could try the tool mentioned on that page or other applications such as DocAve Content Manager and SharePoint Site Migration Manager.
Your question is not very clear but I think you may want to look at Application Templates.
Microsoft provide 40 pre-built templates in the link below and the same technology is available to you. Links from this page should lead you to information showing you how you can crate your own.
Application Templates for Windows SharePoint Services 3.0
http://technet.microsoft.com/en-us/windowsserver/sharepoint/bb407286.aspx

Resources