使用JS获取ProjectServerUrl - 奇怪的结果 [英] Getting ProjectServerUrl with JS - strange result

查看:113
本文介绍了使用JS获取ProjectServerUrl - 奇怪的结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好, 


在项目加载项中,我尝试使用以下代码获取Project Server URL:

 Office.context.document.getProjectFieldAsync(
Office.ProjectProjectFields.ProjectServerUrl,
function(asyncResult){
if(asyncResult.status == Office.AsyncResultStatus。成功){
var _pwa = String(asyncResult.value.fieldValue);
}
}
);

这当我在Project 2013中执行它时工作正常,但是当我在Project 2016(对于同一个项目)中运行它而不是URL时,我得到一个数字(上次是15647236)。每次重新打开Project桌面应用程序时,此数字都不同,但不同项目的
相同。


是否有人遇到此问题?任何想法导致这个以及如何解决它将不胜感激。


 

解决方案

你好irvalchev,


根据描述,似乎这个问题与Project的特定版本有关。由于我无法验证此问题,我建议您通过以下链接与Office Develop团队联系:

Office Developer
平台的客户反馈


问候&费


Hi all, 

In a Project add-in I am trying to get the Project Server URL with the following code:

Office.context.document.getProjectFieldAsync(
    Office.ProjectProjectFields.ProjectServerUrl,
    function (asyncResult) {
        if (asyncResult.status == Office.AsyncResultStatus.Succeeded) {
            var _pwa = String(asyncResult.value.fieldValue);
        }
    }
);

This works fine when I execute it in Project 2013, but when I run it in Project 2016 (for the same project) instead of a URL I get a number (last time it was 15647236). This number is different each time I reopen the Project desktop application, but is the same for different projects.

Has anybody faced this issue? Any ideas what is causing this and how to fix it would be appreciated.

 

解决方案

Hi irvalchev,

Based on the description, it seems that this issue is relative to the specific version of Project. Since there is no environment for me to verify this issue, I suggest that you contact the Office Develop team via link below:
Customer Feedback for the Office Developer Platform

Regards & Fei


这篇关于使用JS获取ProjectServerUrl - 奇怪的结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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