You need to sign in to do that
Don't have an account?
MarkL.ax269
URLFOR, list buttons, and view return URLs
This seems simple, but it's got me stopped cold. I've got a list button designed to be used in a list view (not a related list). It allows the user to select a number of opportunities and then mass-edit them in a controlled manner. My problems started when trying to return the user to the list view on complete. Here's what I want to do:
Code:
- User opens the list view, selects a number of opportunities, and clicks the Update button
- A new page is opened within the iframe - "existing window with sidebar"
- User updates field values
- User clicks Save
- Opportunities are updated and the user is returned to the list view
- If I use the "existing window with sidebar" on the button and launch my scontrol, the display to the user works fine. Except there's no clean way I can find to return the user to the list view. $Request doesn't work because there is no retURL passed.
- So I tried OnClick Javascript and URLFOR. I can get my source URL for the view then, but apparently URLFOR expects Object.Field as parameters and won't accept javascript variables, strings, anything else.
- Ok, old-fashioned way. Still using OnClick Javascript, I called the scontrol using the servlet.integration method and passed in my parameters. This works great and I can return the user to the list view. However I cannot force the scontrol to open within the original frame! It replaces the entire window every time no matter what combination of parent.frames.location, window.location, etc.
Code:
var arrOppIds = {!GETRECORDIDS($ObjectType.Opportunity)}; var callScontrol = "/servlet/servlet.Integration—lid=01N600000008uzZ&ic=1&retURL=" + window.location + "&oppIds=" + arrOppIds.join('-'); parent.frames.location.replace(callScontrol);
window.parent.location.href
rather than window.location , which is an object.
then you should have retURL when you get into your scontrol.
Code:Code:
Code:
Mark
I look forward to meeting as many of the developers as possible at this super-cool event !
Mark
Hi Mark
I was reading your post about this topic particular functionality:
I am a volunteer for a non profit who is implementing Salesforce. I would like to create the exact same functionality but I have no idea how to get
to 2 and 3.
Could you help me with this? Do you have an S-control that could help me?
Basically what I am trying to do is:
1 - select a list of contacts
2 - click "Assign to event"
3 - open a new window where user can select the Event
4 - Save
5 - go back to the list, or even to contacts, I do not really care at this point
If you can help me, I will really appreciate
Thanks in advance
Giorgio
Hey Giorgio, I was just wondering if you happened to receive a solution or perhaps know where to look for one, regarding your question. I am looking into a project of a very similar nature.
Unfortunately not. I ultimately used the Campaign concept to solve this particular issue