SharePoint托管应用程序:种子数据(Visual Studio 2015) [英] SharePoint-Hosted App: Seed Data (Visual Studio 2015)

查看:179
本文介绍了SharePoint托管应用程序:种子数据(Visual Studio 2015)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在SharePoint中有一个应用程序,它定义了几个列表。  我想知道如何将种子数据添加到部署后添加到表中的Visual Studio中?

I have an app in SharePoint that has several lists defined.  I wanted to know how I can add seed data to the Visual Studio that is added to the tables after deploying?

任何人对如何做到这一点都有任何想法?

Anyone have any ideas on how this is done?

推荐答案

您好,

请提供有关"种子数据"的更多信息。

Please provide more information about the "Seed Data".

如果要将预定义数据添加到SharePoint托管加载项的列表中,我们可以添加< Data />在ListInstance的Elements.xml中,如下所示:

If you want to add predefined data into the list in SharePoint hosted add-in, we can add the <Data/> in the ListInstance's Elements.xml, like this:

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <ListInstance Title="List1"
                OnQuickLaunch="TRUE"
                TemplateType="10000"
                Url="Lists/List1"
                Description="My List Instance">
	  <Data>
		  <Rows>
			  <Row>
				  <Field Name="Title">Test1</Field>
			  </Row>
			  <Row>
				  <Field Name="Title">Test2</Field>
			  </Row>
			  <Row>
				  <Field Name="Title">Test3</Field>
			  </Row>
		  </Rows>
	  </Data>
  </ListInstance>

</Elements>




最诚挚的问候,


Best Regards,

丹尼斯


这篇关于SharePoint托管应用程序:种子数据(Visual Studio 2015)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆