+ Start a Discussion

retURL in a s-control link?

Okay lets see if I can clearly articulate this question. It has to do with sending a return URL as part of an s-control. What I want to do is from an s-control have a button that links to the create a new contact page and then once the contact is created returns them to the s-control.
Here is my issue...
Do do this I have to build the retURL into the link to the Contact create page:
I have to pass two GET variables.
1. The account id -> accid=VALID_ACCOUNT_ID
2. The return variable -> retURL=servlet/servlet.Integration?lid=ID_OF_S_CONTROL&eid=ID_OF_OBJECT
The problem is that the retURL has to contain 2 of it's own GET variables...eid & lid. After the contact is created it does not properly read the return URL and shoots me back to the standard detail view of the contact....not the s-control.
So I tried to replace all the unsafe char in the retURL with safe char and it still does not work:
Any ideas? Is this possible? Any help/direction would be greatly appreciated.
Try the saveURL parameter when you pass it into the contact edit URL.  It acts like retURL, but is used when an object is saved.  When an object is new, a new parameter is added to the saveURL called "newid" so that the scontrol can access the newly created object.
That worked like a charm! Thanks...I had been banging my head against this one for awhile.

I've exactly the same probleme. But I still don't know how to solve it. Can you give me a short example, which shows my how to integrate a S-Control which is invoked after the Contact was successfully created and which can access it via it's id.
That would be great.

5th Wheel Steve5th Wheel Steve
I am stuck in the same spot
I have a custom object Presentations which may be related to an account.
If so, my users want to be able to pull the account address information onto the presentation.....
So I created the following custom button:
{!URLFOR($SControl.Update_Presentation_with_Account_Address, Presentation__c.AccountId__c, [P1= Presentation__c.Id ],true )}
This calls the following s-Control
{!URLFOR( $Action.Presentation__c.Edit,$Request.P1)}
My only problem is that if someone accidentally hits the Address Button and want to cancel to return to the original object they are keep getting redirected back to the edit page.......
Any hints as to what I am missing?
5th Wheel Steve5th Wheel Steve
{!URLFOR( $Action.Presentation__c.Edit,$Request.P1,[retURL=URLFOR($Action.Presentation__c.View,$Request.P1)],true)}
this works much better