none
How can I add Forward button in Approved/reject window in Project Server 2010 RRS feed

  • Question

  • Hi all,

    I need to add on new Choice field and button "Forward" in Approved/Reject window for fallowing scenario:-

    I have created a customized EPT for "new Proposal request" with certain stages. Once Proposal Manager fill this page and submit it then in next stage it goes to "Proposal Reviewer" for approval/rejection by workflow and one approval activity added in project Reviewer page after click on this activity new window open with two default option 1) Approve 2) Reject .

    But I required additional button on same window that is "Forward" and text field (with drop down menu fill with EPM users). if Proposal Reviewer wants to delegate his job to anyone else then select user from that choice field and click on forward button then this task would be delegated to selected user for approval..

    Thanks

     

    Saturday, June 4, 2011 7:01 PM

All replies

  • If you are using WWF to develop your workflow, and you are using "OfficeTask" activity, there is a property called "AllowReassign" Ive never used it but it may help you.

    check this:

    http://msdn.microsoft.com/en-us/library/microsoft.office.workflow.actions.officetask_properties.aspx


    Twitter : @MShoubaki | http://jo.linkedin.com/in/mshoubaki
    Sunday, June 5, 2011 7:20 AM
  • Hi Nitin,

    It can be handled easily with some process change, Not everybody in PWA of your organization will be a Proposal reviewer.  There could be a group of ppl who can review the proposal. I mean if you have proposal reviewer group & anyone of the group can review instead of delegate the process.

    If that doesn't solve your issue, You might want to use project server PSI to handle it with custom code :)

    You can try the following:

    1. Create a web part which has Forward button & list of users 
    2. List of user can be found by using resource web service & security web service (if you want to trim the list by some logic - groups etc)- 
    http://msdn.microsoft.com/en-us/library/websvcresource_di_pj14mref.aspx
    http://msdn.microsoft.com/en-us/library/websvcsecurity_di_pj14mref.aspx 

    3. use Workflow web service to update the data of your workflow

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

    4. Add the web part to the page you wanted to,

    Does that help?


    Thanks, Amit Khare |EPM Consultant| Blog: http://amitkhare82.blogspot.com http://www.linkedin.com/in/amitkhare82
    Monday, June 6, 2011 9:10 AM

  • Hi, actually it is very easy to do it: 
    1. Create your own workflow and write lots of code, as Project Server 2010 is based on a sharepoint 2010 can be used, as mentioned above OfficeTask activity.
    2. Create an extension leaf Project Server Workflow Tasks can be done by code or handles. 
    Example of Workflow in EventReciver code:

     [Guid("96713581-67c6-4e83-b575-5c3ea6b37eaf")]

      public class BCWorkflowFeatureEventReceiver : SPFeatureReceiver

      {

        public override void FeatureActivated(SPFeatureReceiverProperties properties)

        {

          var site = (SPSite)properties.Feature.Parent;

          var web = site.RootWeb;

          var ctId =

            new SPContentTypeId("0x0108010038A52C27344148C9B9214F82C7C0298500e9eef901a2834f9eb6d0e302d40a4339");

         

         

     

          var ct = web.AvailableContentTypes[ctId];

          var taskList = web.Lists.TryGetList("Project Server Workflow Tasks");

         

         

     

          SPFieldCollection collFields = taskList.Fields;

     

          var listCT = taskList.ContentTypes[ct.Name] ?? taskList.ContentTypes.Add(ct);

     

       

          listCT.FieldLinks.Add(AddCustomTaskField(collFields, "ReaddressedTo"));

          listCT.FieldLinks.Add(AddCustomTaskField(collFields, "SelectedPM"));

         

     

          listCT.EditFormUrl = "_layouts/PWA/BC.InitiationProject/ApprovalTask.aspx";

          listCT.DisplayFormUrl = "_layouts/PWA/BC.InitiationProject/ApprovalTask.aspx";

     

          listCT.XmlDocuments.Delete("http://schemas.microsoft.com/sharepoint/v3/contenttype/forms/url");

          listCT.Update();

          taskList.Update();

     

          base.FeatureActivated(properties);

        }

     

        private SPFieldLink AddCustomTaskField(SPFieldCollection collFields, string strNewFieldName)

        {

          if (collFields.TryGetFieldByStaticName(strNewFieldName) == null)

          {

            collFields.Add(strNewFieldName, SPFieldType.Text, false);

          }

          var oField = collFields.GetFieldByInternalName(strNewFieldName);

          var SPFL = new SPFieldLink(oField);

          return SPFL;

        }

     

      }

    }


     

     

    3. Create a project with the future of our form of Deployment Location {SharePointRoot} \ Template \ Layouts create a form ApprovalTask.aspx 
    ApprovalTask: PJWebPage the form itself you can peek in Solution Starter ThreeStateApprovalWorkflow 
    4. Next, write your logic in the form of push buttons, dropdown list, and other  and then save all the decisions in the field Custom Task Workflow 
    5. Next, write CustomAcrivity class inherits from SequenceActivity 
    5. Make a blank in the code for the workflow status of the following form and the decisions 
    6. In designe Mode,  place OfficeTask activity 
    7. Set up OfficeTask, just define the previously created ContentTypeId 
    8. Then added a branch in OfficeTask onTaskCompleted and process status of the task. 
    9. After that, add in the basic set up Activity Workflow and then rejoice:) 

     

    • Proposed as answer by Andrey Putin Monday, June 20, 2011 7:56 AM
    Friday, June 17, 2011 6:58 AM
  • Was anyone able to come up with a reasonable response to this request? I have the same requirement which is to add another option beyond Approve and Reject on the Approval Window. 
    Thursday, December 1, 2011 5:11 PM
  • Hi all,

    I am having the same request too :(

    Thursday, May 23, 2013 12:06 PM