子网站上运行脚本失败 [英] Running script on subsite fails

查看:56
本文介绍了子网站上运行脚本失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我正在运行两台服务器(测试,生产),每台服务器都配有Microsoft Sharepoint 2013,并在两台计算机上本地安装了Visual Studio。我玩了EventReceivers并设法完成了一个简单的复制工作,即我从dropbox
A中选择一个值(实际上是一个名字),从dropbox B中选择另一个值.C#脚本查看包含B的列表在第1列中,它将第4列的所有相关条目(这些都是todos)复制到新的列表C中,同时将我在Dropbox A中选择的值复制到最后。所以最后我有例如:

I´m running two servers (test, production), each with Microsoft Sharepoint 2013 and installed Visual Studio locally on both machines. I played with EventReceivers and managed to get a simply copy job done, i.e. I select a value (actually a name) from a dropbox A, and another value from dropbox B. The C# script looks at a list which includes B in column 1 and it copies all related entries of column 4 (which are todos) into a new list C together with the value I selected at dropbox A. So at the end I have e.g.:

一个todo1

一个todo2

一个todo3

我的测试服务器上的脚本运行没有问题,即https://sptest.mydomain.com/我从下拉列表中选择A和B,点击go,出现一个Sharepoint窗口,说明某些内容正在运行。在我想要的所有内容出现在列表C中之后。

The script is running without problems on my test server, i.e. https://sptest.mydomain.com/ I select A and B from the dropdown list, hit go, a Sharepoint window appears saying that something is working. After everything I wanted appears in list C.

所以我在生产服务器上创建了一个新项目,即https://sp.mydomain .com / divisiona /我从testserver复制了脚本,更改了https://sptest.mydomain.com/ 中的所有URL。到https://sp.mydomain.com/divisiona/ built,部署了脚本。
我从Dropbox A和Dropbox B中选择值并点击go。出现在测试服务器上的窗口没有出现在生产服务器上,也没有任何事情发生。

So I created a new project on the production server, i.e. https://sp.mydomain.com/divisiona/ I copied the script from the testserver, change all URL from https://sptest.mydomain.com/  to https://sp.mydomain.com/divisiona/ built, deployed the script. I select the values from dropbox A and from dropbox B and hit go. The window which appears on the testserver, doesn´t appear on the production server and nothing happens at all.

目前我被困住了,不知道在哪里看。也许有人可以给我一些提示?

Currently I´m stucked and have no idea where to look at. Perhaps someone could give me some hints?

问候

M

推荐答案

我建议你尽可能提供完整的代码,这样可以使这个问题更容易被研究。

I suggest you provide the complete code in use if possible, which should make the issue easier to be researched.

如果你想使用事件接收器将数据从一个列表复制到另一个列表,以下文章供您参考。

If you want to use event receiver to copy data from one list to anther, the following articles for your reference.

https://social.msdn.microsoft.com/Forums/office / en-US / 24f07205-bfd2-4df1-9389-b9a0f11e5185 / copying-list-column-to-another-list-in-itemadded-event?forum = sharepointdevelopmentprevious

https:// www.c-sharpcorner.com/UploadFil e / 5b1f04 / create-a-custom-list-level-event-receiver-for-item-added-in /

最诚挚的问候,

丹尼斯


这篇关于子网站上运行脚本失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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