You need to sign in to do that
Don't have an account?
mvr pallala
ProcessInstanceWorkitem Wizard StageManager must not be longer than 40 characters error
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?
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?
James Loghry
Believe the issue is the value of your outputLink is too long. Try generating this with a PageReference method in an Apex class instead. Here's an example: http://lc169.blogspot.com/2013/07/link-to-approval-process-screen.html