Skip to main content
3 个回答
  1. 2018年5月28日 09:10
    /// this is my first vf page custom controller

    public with sharing class newcustomerandagent {

        public PageReference saveagent() {

        insert a; 

        id agentid=a.Id;  //this is im storing the id of inserted record.

          PageReference pageRef = new PageReference('https://c.cs15.visual.force.com/apex/agent_dtail?id='+agentid); // here im passing id through url

        return pageRef;

        

        }

    }

    ///// this is my second vf page code

    <apex:page >

    <apex:pageBlock >

    <apex:pageBlockSection >

    <apex:detail subject="{!$CurrentPage.parameters.id}"/>// here im getting the id which i passed from url

    </apex:pageBlockSection>

    </apex:pageBlock>

    </apex:page>
0/9000