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>
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>
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>
All Answers
Please post your code as well.
Thanks
Mukesh
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>