You need to sign in to do that
Don't have an account?
Eyal_Wiz
Redirect user to a certain URL
Hi all,
Is there any way to redirect the user to another URL once a record is updated?
I've created a new custom object, i've a "after update" trigger for this custom object and in this trigger i'm trying to redirect the user to another location if a certain condition that i defined is happening.
I would really appriciate any lead or idea for solving this as i really need a solution for this real quick.
Thanks alot
Eyal
Maybe can this code help you
Magda
i used that in my class and not in a trigger...
I'm sorry.
If i find a solution i come back to you.
Did you read the apex code guide? Perhaps can you find eneything in this on?
Magda
Code:
Hi,
you have only to write class.function in your trigger.
Like in this code example
I hope that can help you
Magda
It didn't work but thanks alot for all quick responses - I really appricate it!
Eyal
Why is that not running?
In my application it is running...
Maybe has another Person a better solution....
Good Lock by programming
Magda
The class is defind that way:
my mind it is a lack in your trriger or class.
Maybe can the Chapter 8 Paragraph Trigger in salesforce_apex_language_reference.pdf can help you.
magda
From:
I've implemented the below code, but upon clicking save (on 'after update') the page will just return the the original case object as
if no trigger was fired.
trigger TEST_TaskCreator_TGR on Case (after update) {
for( Case Tnew:trigger.new){
if(Tnew.Create_Task__c == True){
TaskCreate.taskpage();
}
}
}
---------------------------------------------------------------------------------
public class TaskCreate {
public static pageReference taskpage() {
PageReference changePage = new PageReference('https://na5.salesforce.com/00T/e');
changePage.setRedirect(true);
return changePage;
}
}
Message Edited by R Tye on 07-27-2008 10:59 PM