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
sonamsonam 

Open detail record in edit mode

Requirement:

1. On the save of CASE we want to open newly created Case Review in 'EDIT' mode.(Case is Parent Object and Case Review Detail Object)

2. Case review has certain fields populated from case.

3. We are using standard page layout.

 

Please help. we've reached a dead end.

 

 

Subramani_SFDCSubramani_SFDC

public PageReference save()

{ return new ApexPages.StandardController(Influencer).edit();

} 

 

This has the advantage of using the standard utility that forms the correct link for you; if salesforce.com changes their behavior later, this code will still get the correct url.

 

(or)

 

pagereference casepage=new pagereference('\'+ID+'/e?returl=%2Fa'+ID

 

 

PageReference acctPage = new PageReference('/'+ID+'/e?retURL=%2Fa'+ID);