function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
jevon woldjevon wold 

How to grab an ID from an account inside a VF page which is inside another VF page?

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='+ + '&id=' + workAccountId;
        PageReference pageRef= new PageReference(path);
        return pageRef;

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

                <!--<apex:commandButton value="Edit" action="{!EditPage}"/>-->
                <apex:commandButton value="Edit" action="{!EditPage}">
                  <apex:param name="EditId" value="{!}" 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"/>-->
Please share the whole class and VF page