通过 URL 设置字段

发布于 2024-12-27 05:05:10 字数 164 浏览 2 评论 0原文

是否可以通过单击 URL 来更改当前项目中的字段?该字段将是一个具有预定义选项的选择字段。

例如,如果项目字段当前为: 状态:2 如果用户单击该链接,该字段现在将是: 状态:3

如果没有,用户是否有其他方法可以轻松更改当前项目中的字段,而无需实际访问该项目?

谢谢!

Is it possible to have a field in the current item be changed by clicking a URL? The field would be a choice field with predefined choices.

Such as if the item field is currently:
Status: 2
If a user clicks the link, the field would now be:
Status: 3

If not, is there any other way for a user to easily change a field in the current item without actually haveing to visit the item?

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

乖乖公主 2025-01-03 05:05:10

不是开箱即用 (OOTB) - 但您有几个选择。

顺便说一下 - 更改“get”上的内容可能很危险,因为您可能会做恶意的事情 - 例如,假设您有一个页面在没有任何提示的情况下删除了用户帐户(确切的例子没有)没关系) - 如果有人错误地点击了该链接,或者更糟糕的是,发送的电子邮件中包含以该页面为源 URL 的图像,该怎么办 - 只需查看电子邮件就可以删除用户帐户。

Not Out Of The Box (OOTB) - but you've a few options.

  • Write an ASPX page to do what you want
  • Use something like SPServices and javascript to update the list item via the web services.
  • Use the Client Object Model (2010 only)

By the way - changing stuff on a 'get' can be dangerous as you can do malicious things - for example imagine you have a page that deletes the users account without any prompting (exact example doesn't matter) - what if someone clicks on that link by mistake or even worse what about an email sent with an image with that page as source URL - simply viewing the email could delete the users account.

赠意 2025-01-03 05:05:10

使用 GET 请求是不可能的,但 SharePoint 2010 提供了一个 RESTful API 来管理来自任何客户端的 ListItems。REST

API 位于每个 SharePoint 站点下的虚拟 WebServices 文件夹内。
http://YourSharePointSite/_vti_bin/ListData.svc

要对 SharePoint ListItems 执行更新,您必须创建 PUT 请求。有关 SharePoint REST API 的详细信息,您应该查看 这个 MSDN 站点,还有本文链接的很多示例。

托尔斯滕

It's not possible by using a GET request, but SharePoint 2010 is offering a RESTful API to manage ListItems from any client

The REST API is located within the virtual WebServices folgder under each SharePoint Site.
http://YourSharePointSite/_vti_bin/ListData.svc.

To perform an update on SharePoint ListItems you have to create a PUT Request. For more information on SharePoints REST API you should have a look at this MSDN site, there are also a lot of samples linked from this article.

Thorsten

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文