• mvr pallala
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 0
    Replies
Hi Team,
the below is my code to implement the Items to Approve functionality using Visualforce Page and Apex.
Calss:
Public class actcontoller{
public Schema.SObjectType objType {get;set;}
public List<processinstanceworkitem> process {get; set;}
public actcontoller() {
Process=[select id, actorid ,ProcessInstanceId, processinstance.targetobjectid,processinstance.targetobject.name ,CreatedDate from processinstanceworkitem where actorid = :userinfo.getuserid() LIMIT 5];
( processinstanceworkitem p:process){
objType = P.processinstance.targetobjectid.getSobjectType();
//PrcocessID=p.ID; } } }
VF PAGE:
<apex:page controller="
actcontoller">
<apex:PageBlock>

<apex:pageBlockTable value="{!Process}" var="task">
<apex:column headerValue="Action">
<apex:outputLink target="_top" value="p/process/ProcessInstanceWorkitemWizardStageManager?id={!task.Id}">Approve/Reject</apex:outputLink> </apex:column>
<apex:column headerValue="Related To" value="{!task.processinstance.targetobjectid}"/>
<apex:column headerValue="Type" value="{!objType}"/>
<apex:column headerValue="Date Submitted" value="{!task.CreatedDate}"/>
</apex:pageBlockTable> </apex:pageBlock>
</apex:Page>

When i click on approve/reject link i am getting the above error in Title.any one help me to resolve it?
 
Hi,

Is there any sample code to implement the items to Approve functionality in the Home Page Layout using Vf Page.

Can anyone help ?