function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

VF Page retURL, S-Control

Hi Can anybopdy help me out in this issue, where I need to get VF Page "actid" in s-control to return back with value.

I tried using {!$Request.actid} in s-control but it was retuning null value.


<apex:page Controller="Quote" tabStyle="Quote__c">
<apex:form >
        <apex:pageBlock title="Quote Picklist navigate test">
            <apex:pageBlockSection title="Quote Header">
               <apex:inputField id="Picklist" value="{!Quote.Add_Associate_Edit__c}">
                   <apex:actionSupport event="onchange" action="{!EventChangeAction}" />
               <apex:outputField id="Link" value="{!Quote.Account__c}"/>
               <apex:inputField value="{!Quote.Bill_To__c}"/>



and my controller


public class Quote
    Quote__c Quote;
    Account account;
    ID AccountId = Apexpages.currentPage().getParameters().get('actid');
    String BillTo = Apexpages.currentPage().getParameters().get('billTo');

    public PageReference EventChangeAction()
    if(Quote == null)
    Quote = new Quote__c();
            if(Quote.Add_Associate_Edit__c == 'Add')
               PageReference pageRef = new PageReference('/001/e?saveURL=/servlet/servlet.Integration?lid=01N80000000H3IF(S-ControlID)&retURL=/apex/Test_picklist?actid='+AccountId+'&billTo=');
               return pageRef;

            else if(Quote.Add_Associate_Edit__c == 'Associate')
                PageReference pageRef2 = new PageReference('');
                return pageRef2;
    return null;

    public Quote__c getQuote()
        if(Quote == null)
        Quote = new Quote__c();
        account = new Account();
                account = [select Id,name from Account where Id =:AccountId  limit 1];
                Quote.Account__c = account.Id;
                If(BillTo != null)
                Quote.Bill_To__c = BillTo;
        return Quote;




          sforce.connection.sessionId = "{!$Api.Session_ID}"


          var x = '{!$Request.newid}';



          window.parent.location.href =;  



catch (err)   {    alert(err);   }