Difference between action.setRedirectURL() vs. gs.setRedirect()?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2014 12:43 PM
Is there any significant difference between these two calls?
action.setRedirectURL(url);
vs.
gs.setRedirect(url);
- Labels:
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2014 03:08 PM
I think action.setRedirectURL() is used in UI Actions, and gs.setRedirect() is used in Business Rules. Other than that, they look like they do the same thing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2015 08:50 PM
action.setRedirectURL() works in my business rule....
Can you confirm anything else that you said?
This is in curiosity to my thread that I've posted here:
Redirect to current after submission
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2015 12:05 AM
As per wiki,
gs.setRedirect(url);
Sets the redirect URI for this transaction. This determines the next page the user will see.
action.setRedirectURL(url);
As part of a UI action, you may want to redirect a user to a URL. For example, you might add links to a form or open a new record after it is created from a UI action.
To redirect a user to a URL from a UI action, use this syntax to define the redirect link:
action.setRedirectURL('http://www.mysite.com/mypage.htm');
To direct a user to a record, use this syntax, where new_record is the variable name for the GlideRecord:action.setRedirectURL(new_record);
- I think,no difference in this two except the difference which Sage mentioned above.