+ Start a Discussion
Abhiman MungalAbhiman Mungal 

redirect to record detail page

User-added image
when i click on customer name that time i want to open that corresponding record detail in that particular object 
Abhiman MungalAbhiman Mungal
this screen shot record are from order__c and this customer name is from profile__c 
i try to fetch the record from profile that time its give me an error 
Hi Abhiman,

Pass the id of reocrd from VF to apex controller.
In the apex method use PageReference to redirect to record detail page.
public PageReference recordDP(ID) {
        PageReference pg = new PageReference('/'+ID);
        return pg;

Hope this helps.
Sohan Raj GuptaSohan Raj Gupta
Hi Abhiman,

You can show Customer name as Link and add Profile__c object id with that.

I hope this will help you. If not, then share your code, so I will look into this.

Sohan Raj Gupta