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
SapanaSapana 

Current page ID

how do we get Id of the current page??

SRKSRK

<script>
 alert("{!$CurrentPage.Name}");
</script>

 

$CurrentPage is a salesfroce global varable as a ref for current page

SapanaSapana

Sorry I didnt put question properly

 

Actually I have three objects A,B &C

B has lookup relationship with A and masterdetail relationship with C

 I have displayed the records of  object C  on a detail page of  object A using datatable along with edit and delete link , now when i click on edit link for a record the edit page for that record gets opened into same window ,now after that when I save a record i want to display the same detail page of the object A record to be displayed

So tell me how can I get Object A record Id so dat I can specify it in return URL to navigate to that page again

SRKSRK

When u click on edit link before redirect to edit of c add the paramter &retURL=/<ID of Record A>

 

I belive When u create edit link u set the ID of each  C record respactive to it link
so as u r set the ID with that id set one more parameter &retURL=/<ID of Record A>  //

 

ApexPages.currentPage().getParameters().get(Id);