You need to sign in to do that
Don't have an account?
jevon 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='+ 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>
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>
AMIT KAMBOJ
Please share the whole class and VF page