none
Creating sharepoint hosted webparts for your project server 2013 app RRS feed

  • Question

  • Hello,

    I'm developing an app for Project Server 2013 using javascript, now for my app I would like to add a webpart. However, using the project server API inside a webpart seems impossible for now.

    I've already tried the following things:

    • Iframing my app inside my webpart:

    After I messed around a little bit to allow Iframing I got this to work partly, however I can't get rid of the masterpage of my app. This means I have the whole sharepoint header and stuff as well, which I don't need.

    • Accessing the Project Server API directly in my webpart

    This is how it should work, however, it doesn't. After a bit of debugging I found out that the problem is that it queries "server/site/pages/pagename/vti_bin/..." instead of "serverc/site/vti_bin/...", thus giving me 404 errors.

    Is there anyone who could tell me what the "official" approach is to using the Project Server api inside a webpart?

    Thanks!

    Friday, February 21, 2014 9:02 AM

Answers

  • Hello,

    I have moved the post to the customisation forum so that someone can help you with the SharePoint hosted App part.

    I'm not a dev but one of our devs ran into a similar issue, it was something to do with having the set the IsPageUrl property on the PS.ProjectContext.

    projectContext.set_isPageUrl(SP.ClientContext.get_current().get_isPageUrl

    Paul


    Paul Mather | Twitter | http://pwmather.wordpress.com | CPS

    • Marked as answer by goftion Friday, February 21, 2014 10:47 AM
    Friday, February 21, 2014 10:34 AM
    Moderator

All replies

  • Hello,

    I have moved the post to the customisation forum so that someone can help you with the SharePoint hosted App part.

    I'm not a dev but one of our devs ran into a similar issue, it was something to do with having the set the IsPageUrl property on the PS.ProjectContext.

    projectContext.set_isPageUrl(SP.ClientContext.get_current().get_isPageUrl

    Paul


    Paul Mather | Twitter | http://pwmather.wordpress.com | CPS

    • Marked as answer by goftion Friday, February 21, 2014 10:47 AM
    Friday, February 21, 2014 10:34 AM
    Moderator
  • This fixed it, thanks. However, could anyone explain to me why the pageurl is correct in the clientcontext but not in the projectcontext? Is this a bug or with a specific reason?
    Friday, February 21, 2014 10:48 AM
  • Hello,

    Glad that sorted it for you. It is not a bug, just a difference between the clientcontext and projectcontext. I am not sure on the reasoning for this. Only Microsoft could answer that for you if you wanted to know.

    Paul


    Paul Mather | Twitter | http://pwmather.wordpress.com | CPS

    Friday, February 21, 2014 10:51 AM
    Moderator