• SOURAV SAHA 7
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 0
    Replies
I'm planning to create a Managed Package for a Product. My concern is that how can I automate the Approval Process creation? As there is no option to add the Approval Processes in Package. And for now, when I'm Installing my beta packages in our Test Org/ on Other Developer Orgs I migrate the Approval Processes using Eclipse. But when external users install our package how can they add multiple Approval Process. As the manual way to create those Process is not a great way. It would be great if anyone can help me out through this. 
Thanks,
Sourav
Apex Code:
public class BusinessProcessVFPagesHelper {

    public List<Business_Process__c> defectList = new List<Business_Process__c>();
    public List<Historical_Comment__c> getHisList() {
        return hisList;
    }
    List<Historical_Comment__c> hisList{get;set;}
    String BusinessProcessID;
    public BusinessProcessVFPagesHelper(){
        BusinessProcessID=ApexPages.currentPage().getParameters().get('Id');
        hisList=[Select Id, Name, Business_Process__c, Comment__c, CreatedBy.Name, CreatedDate from Historical_Comment__c where Business_Process__c =:BusinessProcessID];
    }
}
VF page:
<apex:page standardController="Business_Process__c" Extensions="BusinessProcessVFPagesHelper" sidebar="false" showHeader="false" docType="html-5.0">
    <style>
        .headerRow .comment {
            color:  #f3f2f2 !important;
            background-color: #0070d2 !important;
        }
        .Column .comment {
            color:  #DC143C !important;

        }
  </style>
  <apex:pageBlock >
    <apex:pageBlockTable value="{!hisList}" var="cse" >
       
                <apex:column headerClass="comment" headerValue="No." >
                <apex:outputLink value="/{!cse.id}" target="_blank">{!cse.Name}</apex:outputLink>
                </apex:column>
                <apex:column headerValue="Comment" value="{!cse.Comment__c}" headerClass="comment" style="font-color:red" />
                <apex:column headerValue="Created By" value="{!cse.CreatedBy.Name}" headerClass="comment"/> 
                <apex:column headerValue="Created Date" value="{!cse.CreatedDate}" headerClass="comment"/>
               
     </apex:pageBlockTable> 
  </apex:pageBlock>
</apex:page>

I would like to do this in a single code both for apex and VF pages. Any one plz help me what I suppose to do.