none
Access custom fields of Project Server from workflow RRS feed

  • Question

  • I've defnied Enterprise Custom Field in my Project Server Settings. I am using this DM Dynamic Workflow:

    http://archive.msdn.microsoft.com/P2010SolutionStarter/Release/ProjectReleases.aspx?ReleaseId=4456

    How can I get my custom field value from workflow?

    I tried with view.asmx service, but no luck...

    This is exactly what I need, but it doesn't work, I can't even instantiate View()
    http://www.projectserver2010blog.com/2010/03/project-server-2010-accessing-intrinsic.html

    Error:

    The type 'Microsoft.Office.Project.Server.WebServiceProxy.View' has no constructors defined

    • Edited by SPManiac Friday, November 30, 2012 10:52 PM
    Friday, November 30, 2012 6:16 PM

Answers

  • Hi SPManiac,

    In "DM Dynamic Workflow" you can not use customized code, if you are creating new workflow from Visual Studio workflow for project server then you can your ReadProjectPropertise control to read any kind of project attributes. Else...

    If you need to get Project details and attributes through PSI, then you should go with ProjectDataSet DS which you will find in project.asmx service, in ProjectDataSet you will find Project, Custtomfields, resources etc. table which have the respective project values.

    In Project.asmx service you have methods like readProjectList() and readProject(projectUid) methods which will return you the ProjectDataSet.

    Let us know if you are looking for else, or this solve your problems.

    Regards,


    Avinash kumar | e2eProjects Pvt. Ltd | Blog:http://avigr8.wordpress.com


    Monday, December 3, 2012 7:20 AM

All replies

  • I've tried by adding this code to a GetProjectName method, but it doesn't work. If I add new method and add this code, it also doesn't work.
    Is there stomething else that I should do?

    var srvCustom = GetPSI(workflowContext).CustomFieldsWebService;
    using (var dsResource = srvCustom.ReadCustomFields(String.Empty, false))
    {
    var resourceRow = dsResource.CustomFields.FindByMDPROPUID(new Guid("a05e7862-146d-4329-b67d-4757e8e17a26"));
    if (resourceRow == null)
    return null;

    }
    Sunday, December 2, 2012 1:17 PM
  • Hi SPManiac,

    In "DM Dynamic Workflow" you can not use customized code, if you are creating new workflow from Visual Studio workflow for project server then you can your ReadProjectPropertise control to read any kind of project attributes. Else...

    If you need to get Project details and attributes through PSI, then you should go with ProjectDataSet DS which you will find in project.asmx service, in ProjectDataSet you will find Project, Custtomfields, resources etc. table which have the respective project values.

    In Project.asmx service you have methods like readProjectList() and readProject(projectUid) methods which will return you the ProjectDataSet.

    Let us know if you are looking for else, or this solve your problems.

    Regards,


    Avinash kumar | e2eProjects Pvt. Ltd | Blog:http://avigr8.wordpress.com


    Monday, December 3, 2012 7:20 AM
  • Thanks Avinash,

    actually, you can use customized code. I've downloaded source code from same MS page and the code is great. It has all PSI services already implemented. I've just modified ProxyPSIService.cs to get to my custom fields.


    • Edited by SPManiac Tuesday, December 4, 2012 8:35 AM
    Tuesday, December 4, 2012 8:34 AM