在匹配PHA查询字符串值和当前项ID之后,我们如何从主机Web列表中获取数据。 [英] How we can get the data form host web list after match the PHA query string value and current Item ID .

查看:82
本文介绍了在匹配PHA查询字符串值和当前项ID之后,我们如何从主机Web列表中获取数据。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

Hi All,

我已经创建了提供商托管应用程序,应用程序托管在azure现在我正在尝试获取数据表单匹配PHA查询字符串值和当前项ID后的主机Web列表,但是当我们启动应用程序时,错误显示。

I have create the provider hosted app and app is hosted on azure now i am trying to get the data form host web list after match the PHA query string value and current Item ID but when we launch the app below error shows.

错误:"来自服务器的意外响应数据";

提供商托管应用代码

Provider Hosted App Code

注意:在下面的CAML查询中我有alredy得到CurrentItemID所以没有问题

Note : In below CAML Query i have alredy get the CurrentItemID so there is no issue

 < script type =" text / javascript">

 <script type="text/javascript">


function GetSiteRequestRecord(){

function GetSiteRequestRecord() {

推荐答案

您好Deepak,

Hi Deepak,

我们需要使用跨域库从Provider托管app中的主机网站获取数据。

We need to use Cross Domain library to get data from host web in Provider hosted app.

以下是一些代码演示供您参考:

Here are some code demos for your reference:

从提供商托管的应用程序访问SharePoint数据:使用正确的上下文

从添加中访问SharePoint 2013数据 - ins使用
跨域库

谢谢

最好的问候


这篇关于在匹配PHA查询字符串值和当前项ID之后,我们如何从主机Web列表中获取数据。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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