You need to sign in to do that
Don't have an account?
Prasanth Reddy M
Account Redirect page for EDIT is working for VF pages but for standard layouts its returning home page.
Hi,
The bellow Account Redirect page for EDIT is working fine for VF pages but for standard layouts after editing the record it is not returning home page instead of account detail page.
Am i missing something here?
Pls suggest.
The bellow Account Redirect page for EDIT is working fine for VF pages but for standard layouts after editing the record it is not returning home page instead of account detail page.
Am i missing something here?
Pls suggest.
public with sharing class DispatcherAccounteditController { public DispatcherAccounteditController(ApexPages.StandardController controller) { this.controller = controller; } public PageReference getRedir() { Account acc = [Select id, recordtypeid From Account Where Id = :ApexPages.currentPage().getParameters().get('id')]; PageReference newPage; if (acc.recordtypeid == '0123B000000Hs88') { newPage = Page.AccountEdt; } else { newPage = new PageReference('/' + acc.id +'/e'); newPage.getParameters().put('nooverride', '1'); } newPage.getParameters().put('id', acc.id); return newPage.setRedirect(true); } private final ApexPages.StandardController controller; }
How are you using this page ??