惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Security Affairs
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Jina AI
Jina AI
P
Palo Alto Networks Blog
GbyAI
GbyAI
大猫的无限游戏
大猫的无限游戏
A
Arctic Wolf
Hugging Face - Blog
Hugging Face - Blog
小众软件
小众软件
Y
Y Combinator Blog
T
The Blog of Author Tim Ferriss
Blog — PlanetScale
Blog — PlanetScale
S
Schneier on Security
V
Vulnerabilities – Threatpost
C
Cybersecurity and Infrastructure Security Agency CISA
雷峰网
雷峰网
T
Tenable Blog
人人都是产品经理
人人都是产品经理
T
Tor Project blog
C
Cyber Attacks, Cyber Crime and Cyber Security
AWS News Blog
AWS News Blog
Microsoft Security Blog
Microsoft Security Blog
J
Java Code Geeks
Scott Helme
Scott Helme
SecWiki News
SecWiki News
C
CERT Recently Published Vulnerability Notes
Recorded Future
Recorded Future
I
InfoQ
Security Archives - TechRepublic
Security Archives - TechRepublic
Help Net Security
Help Net Security
Cloudbric
Cloudbric
C
Check Point Blog
Engineering at Meta
Engineering at Meta
TaoSecurity Blog
TaoSecurity Blog
B
Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园_首页
N
News and Events Feed by Topic
云风的 BLOG
云风的 BLOG
MyScale Blog
MyScale Blog
腾讯CDC
量子位
Application and Cybersecurity Blog
Application and Cybersecurity Blog
K
Kaspersky official blog
Vercel News
Vercel News
F
Full Disclosure
T
Troy Hunt's Blog
Forbes - Security
Forbes - Security
S
Security @ Cisco Blogs

博客园 - KXLF

SharePoint 事件 2137 / 2138 :SharePoint 运行状况分析器检测到错误。驱动器的可用空间不足。 SharePoint 事件 7363:对象缓存:缓存使用的超级读者帐户没有足够的权限访问SharePoint数据库。 [转] geochart 地图控件官方示例 Outlook 2007 同步到本地的SharePoint文档库,点击不同文件夹时,总是弹出登陆框 [转]Publishing files stored in the file system through external list(使用bcs映射文件系统) SPContext.Current.Web.CurrentUser 为 null [转]Use PowerShell to Manage Lists, Views, and Items in SharePoint(使用PowerShell管理列表、视图、列表项) 连接TFS服务器记住密码。 [转]Login over HTTPS from HTTP pages(使用https登陆) [转]How to Handle Long PowerShell Statements(在PowerShell中使用多行模式) [转]How to use String.Format in PowerShell?(如何在PowerShell中使用string.format?) 推荐一个电子书网站,里面关于SharePoint的英文书籍有很多。 SharePoint 2010 术语表 [转]SharePoint 2010: Client Object Model for JavaScript (ECMAScript)(使用客户端对象模型) [转]Importing documents to Document Libraries with Mavention Import Document Library Contents(使用VS插件导出文档库内容定义) [转]how to programatically access built-in properties of open xml word doc(如何读取open xml格式文档属性) [转]Content targeting for anonymous users with SharePoint Server 2010(给匿名用户配置外部配置文件) [转]Allowing anonymous users access to SharePoint user's profile pictures(允许匿名用户访问用户配置文件中的头像图片) [转][MS-MAVA]: Microsoft Office SharePoint Server (MOSS) Analytics View Access Protocol Specification
[转]Import List Instances and their data with Mavention Import List Instance(使用VS插件导出列表数据定义)
KXLF · 2011-11-03 · via 博客园 - KXLF

When working with custom Lists you find yourself often redeploying the List and creating some test data to verify that everything is working correctly. Entering sample data may be fun to do once but becomes rather boring after a few times. Find out how to reuse your sample data in the development process using Mavention Import List Instance.

SharePoint Lists and test data

SharePoint Lists are a great place for storing data in SharePoint. They are very flexible, highly customizable and out of the box contain rich functionality. Not surprisingly SharePoint Lists are being used in many solutions.

The very base of every SharePoint List is its schema: the definition of Site Columns and Content Types which can be used to store your data. Just like when working with databases, it can be challenging to modify the schema once it has been deployed, especially if the List contains some content.

When developing custom SharePoint Lists one way to find out if everything works as planned is to fill the List with test data and run some tests. Although it might be tempting to fill in fields with random data depending on their type, it might be better to spend some more time and provide real-life information instead. This might not only help you discover some edge cases about your solution but it is also more intuitive to end users should you want to gather their feedback as well.

The challenge with filling lists with real-life data during the development process is that there are no generators that understand your business and your scenario. So you can either create one yourself, which can get very time consuming, or fill in the data every time you modify the List schema and create a new build, which is also far from desirable. There is however yet another option…

In the perfect world

Wouldn’t it be great if you could enter the test data once, store them separately from your List’s schema and then reapply the data over and over again during the whole development process doing nothing more than minor changes to the data so that it fits the new schema? If that’s what you want, Mavention Import List Instance might be just the right solution for you.

Introducting

Mavention Import List Instance is an extension for the Visual Studio 2010 SharePoint Developer Tools that allows you to import List Instances and their data into your SharePoint Project. After importing the List Instance to your project you can include it in one of your Features and create your List prefilled with test data with a single mouse click!

How it works

As an example I’ve created a custom List that contains names of all Mavens. Although in this case I created the List manually, it doesn’t really matter how you would create that List as long as it’s there.

SharePoint List with test data

After installing Mavention Import List Instance a new menu item is added to every List node in the Server Explorer.

Import List Instance menu item added to the List context menu

After clicking the menu item, the extension will import the selected List to your SharePoint Project as a List Instance SharePoint Project Item (SPI).

Important: for the Import operation to work, you have to have a SharePoint Project open and active in Visual Studio.

List imported to a SharePoint Project

As you can see, the Mavention Import List Instance extension includes all field values in the imported List Instance SPI. To keep your test data clean and manageable it might be a good idea to remove all the unnecessary fields such as CreatedAuthor, etc. Values of most of those fields cannot be imported anyway and are generated automatically by SharePoint.

Tip: Removing unnecessary fields can be doable if you have only a few rows but can quickly become a tedious process. In my next article I will show you how you can remove unwanted fields from the exported List Instance using XSLT and Visual Studio.

The only thing left for you to do now is to add the imported List Instance SPI to a Feature and the next time you will deploy your Solution and activate that Feature your List will be filled with some sample data.

A newly created list including its data in a Team Site

The great part is that this approach works with new lists as well as existing lists.

Download: Mavention Import List Instance from Visual Studio Gallery.