locked
how to pass parameters from doc library custom action to psi extension RRS feed

  • Question

  • Thank you for considering my question.

    I have followed the instructions for building the HelloService PSI extension, including the 2nd revision where it also displays the username of the caller.

    I have followed the instructions for adding a custom action to the edit control block of an XL file in a shared document library.

    When I put the URL of the PSI extension into the definition of the custom action and click on the option - I get the browser page that I get when I simply put the PSI URL into the browser.

    1) How do I tell the custom action to invoke the method in the PSI extension that will actually cause the hello msg to be displayed?

    2) How do I let the PSI extension know the URL of the XL file that I'm referring to? The point is to have  the "real" PSI extension import the rows of that XL file into Project Server (using different logic than the Bulk Import solution starter)?

    3) How do I find the reference info on SharePoint Server that explains all this?

    Thank you for your time!

    Ken Henderson


    Ken Henderson

    Monday, February 27, 2012 10:17 AM

Answers

  • Followed the steps described in http://msdn.microsoft.com/en-us/library/ff843379.aspx and verified that it is working as expected.

    1.             How do I tell the custom action to invoke the method in the PSI extension that will actually cause the hello msg to be displayed?

    As pet article http://msdn.microsoft.com/en-us/library/bb428837(v=office.12).aspx we are creating an object or HelloworldPSI Extension in the new sample program

    WSHelloWorldPSI.HelloWorldPSI helloWorldWS =    new HelloWorldPSIClient.WSHelloWorldPSI.HelloWorldPSI();

          helloWorldWS.Url = "http://localhost/pwa/_vti_bin/psi/HelloWorldPSI.asmx";

          helloWorldWS.Credentials = CredentialCache.DefaultCredentials;

               string hello = helloWorldWS.HelloWorld();

               MessageBox.Show(hello);

    String value is returned from the PSI extension and then displayed. In this case we are calling the action HelloWorld()

    1.             How do I let the PSI extension know the URL of the XL file that I'm referring to?

    The point is to have the "real" PSI extension import the rows of that XL file into Project Server (using different logic than the Bulk Import solution starter)?

    We are calling the PSIextenstion from the new program. Could you please explain what is an XL file ?

    1.             How do I find the reference info on SharePoint Server that explains all this?

    Project Server 2010 SDK has all the information and the sample codes

    http://msdn.microsoft.com/en-us/library/ms512767.aspx

    http://www.microsoft.com/download/en/details.aspx?id=15511

    Please let me know if you have any questions.



    Cheers. Happy troubleshooting !!! Sriram E - MSFT Enterprise Project Management

    • Marked as answer by Qiao Wei Sunday, March 11, 2012 2:35 PM
    Monday, March 5, 2012 7:09 PM

All replies

  • Hi, 

    Thanks for your post.

    I’m trying to involve someone more familiar with this topic to further look at this issue.

    Thanks,
    Qiao


    Qiao Wei

    TechNet Community Support

    Friday, March 2, 2012 11:59 AM
  • Saturday, March 3, 2012 6:10 AM
  • Followed the steps described in http://msdn.microsoft.com/en-us/library/ff843379.aspx and verified that it is working as expected.

    1.             How do I tell the custom action to invoke the method in the PSI extension that will actually cause the hello msg to be displayed?

    As pet article http://msdn.microsoft.com/en-us/library/bb428837(v=office.12).aspx we are creating an object or HelloworldPSI Extension in the new sample program

    WSHelloWorldPSI.HelloWorldPSI helloWorldWS =    new HelloWorldPSIClient.WSHelloWorldPSI.HelloWorldPSI();

          helloWorldWS.Url = "http://localhost/pwa/_vti_bin/psi/HelloWorldPSI.asmx";

          helloWorldWS.Credentials = CredentialCache.DefaultCredentials;

               string hello = helloWorldWS.HelloWorld();

               MessageBox.Show(hello);

    String value is returned from the PSI extension and then displayed. In this case we are calling the action HelloWorld()

    1.             How do I let the PSI extension know the URL of the XL file that I'm referring to?

    The point is to have the "real" PSI extension import the rows of that XL file into Project Server (using different logic than the Bulk Import solution starter)?

    We are calling the PSIextenstion from the new program. Could you please explain what is an XL file ?

    1.             How do I find the reference info on SharePoint Server that explains all this?

    Project Server 2010 SDK has all the information and the sample codes

    http://msdn.microsoft.com/en-us/library/ms512767.aspx

    http://www.microsoft.com/download/en/details.aspx?id=15511

    Please let me know if you have any questions.



    Cheers. Happy troubleshooting !!! Sriram E - MSFT Enterprise Project Management

    • Marked as answer by Qiao Wei Sunday, March 11, 2012 2:35 PM
    Monday, March 5, 2012 7:09 PM
  • Thank you for your time and effort in addressing my problem.

    I am afraid I have not been successful in describing my goal and the roadblock with which I am struggling.

    • I have been successful at following steps in constructing a PSI extension, including helloWorldWS.
    • I can put the URL of that service into IE and it will tell me that I have a web service installed correctly.
    • I can create a test program that calls the method [ string hello = helloWorldWS.HelloWorld(); ] and retrieve the text message for the msg box.
    • On the SharePoint Server side, I can add a custom action to the edit control block of an XL file in the Shared Documents library.
    • If I create that custom action specifying the URL property, I can put my PSI extension service's URL into that field and when I click on the custom action - IE is called and it shows the same page as when I put the service's URL directly into IE's address field.  [problem: no method is called]

    Here is what I haven't been able to do:

    • I've tried adding arguments (after a ?) to the URL to be able to pass the XL file's {ListId} and {ItemId} to the PSI extension - I need help there.
    • I don't know how to form the URL string in the custom action property to cause the HelloWorld method to be called (as above).

    Can the ECB's custom action be made to do what I need?  (assuming creation using SharePoint Designer - maybe it needs Visual Studio?)

    Should I be coding a workflow and calling that from the custom action instead?

    Thanks for your help!

    Ken Henderson


    Ken Henderson

    Sunday, March 11, 2012 7:05 PM