문제

I have ABC SharePoint hosted app and I have a ABClist inside ABC app, there is XYZ custom page available in host web.

Now I want to save query string URL to ABClist app list from host web's XYZ custom page (ootb page).

도움이 되었습니까?

해결책

You need to construct post URL as shown below:

$.ajax({
        url: _spPageContextInfo.webAbsoluteUrl + "/" + "App web name" +  "/_api/web/lists/GetByTitle('" + "App web list name" + "')/items",
        type: "POST",
        headers: {
            "accept": "application/json;odata=verbose",
            "X-RequestDigest": $("#__REQUESTDIGEST").val(),
            "content-Type": "application/json;odata=verbose"
        },
        data: JSON.stringify(data),
        success: function (data) {
            console.log(data);
        },
        error: function (error) {
            alert(JSON.stringify(error));
        }
    });
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top