• jevon wold
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
So I have a Visualforce page called Activities that is showing on the accounts page which shows the activities linked to that account id. On Activites Visualforce page i have an edit button which links to another Visualforce page, but I can not figure out how to get the id from the 2nd Visualforce page.
Here is my Class:
 public PageReference EditPage()
    {
   
        string path='/apex/pg_Add_Work_Activity?acctid='+ acct.id + '&id=' + workAccountId;
        PageReference pageRef= new PageReference(path);
        pageRef.setredirect(true);
        return pageRef;
        }

And here is the Visualforce Page:(notice i have some attempts commented out):

<apex:column>
                <!--<apex:commandButton value="Edit" action="{!EditPage}"/>-->
                <apex:commandButton value="Edit" action="{!EditPage}">
                  <apex:param name="EditId" value="{!a.id}" assignto="{!workAccountId}"/></apex:commandButton>
               
             <!--<apex:commandButton action="{!URLFOR($Action.Work_Activity__c.EditPage,null,[retURL=$Page.pg_Add_Work_Activity+'?id='+'Id'], true)}" value="Edit" id="theButton"/>-->
            </apex:column>