使用JS获取ProjectServerUrl - 奇怪的结果 [英] Getting ProjectServerUrl with JS - strange result
问题描述
大家好,
在项目加载项中,我尝试使用以下代码获取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 PlatformRegards & Fei
这篇关于使用JS获取ProjectServerUrl - 奇怪的结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!