• Nitin Paliwal
  • NEWBIE
  • 215 Points
  • Member since 2014

  • Chatter
    Feed
  • 7
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 86
    Replies
Hi, 

If I click the save button, the pageblock refreshed but the values still the same.
Could you help me with this error.

Thanks,
Sascha
 
public class VTP21_class {

Public String SelectedUserId {get; set;}
Public String SelectedOppId {get; set;}

Private Opportunity OppSave;

Public List <Opportunity> getOppDList2() {
    List <Opportunity> OppD = [SELECT Id, Name, Amount FROM Opportunity WHERE Id = :SelectedOppId];
        IF (SelectedOppId != NULL) {
            OppSave = [SELECT Id FROM Opportunity WHERE Id = :SelectedOppId];
        }
    RETURN OppD;
} 

Public pageReference getOppDList() {
    getOppDList2(); 
    RETURN NULL; 
}

Public PageReference SaveInlineChanges() {
    UPDATE OppSave;
    RETURN NULL;
}


Public PageReference CancelInlineChanges() {
    RETURN ApexPages.CurrentPage();
}

}
 
<apex:pageblock id="pbOppD" mode="inlineEdit">
    <apex:pageBlockButtons location="top">
        <apex:commandButton action="{!SaveInlineChanges}" value="Save" id="saveButton" rerender="pbOpp ,pbOppD"/> -->
        <apex:commandButton action="{!CancelInlineChanges}" value="Cancel" id="cancelButton"/>
    </apex:pageBlockButtons>
    <apex:pageBlockSection >
        <apex:pageblocktable value="{!OppDList2}" var="OppD">
            <apex:column headervalue="Name">
                <apex:outputfield value="{!OppD.Name}" />
            </apex:column>        
            <apex:column headervalue="Amount">
                <apex:outputfield value="{!OppD.Amount}" />
            </apex:column>
        </apex:pageblocktable>   
    </apex:pageBlockSection>
</apex:pageblock>

 
In Task creation for Opportunity I have to make sure that only certain picklist values are available (or we can restrict to Save Task from Valiation Rule on Task) in Custom Pricklist field for certain Stage field values in Opportunity.

Now, from Task in Validation Rule we can get only Parent ID (WhatID) which will be ID of Opportunity.
Now, how I can get Stage field of Opportunity in Validation Rule.
I want something like:

If (WhatId.Stage = '4 Handover', Category__c!='Order', false)
I wanted to grab the row Id below and pass it to the "rowz" variable. In my debug log the value is never passed from my method. Any ideas on how to adjust?

I'm using rowz = (Id) ApexPages.currentPage().getParameters().get('rowDel'); to try and grab the row ID, but it keeps giving me a null.
Apex
public class StoreFront2 {    
    public String message { get; set; }
    List<DisplayMerchandise> products;
    Map<Id, DisplayMerchandise> cart;

    public Id rowz;
    public id rowDel{get;set;}
    
    public PageReference shop(){
   
        handleTheBasket();
        message = 'You bought: ';
        for (DisplayMerchandise p:products){
            if(p.tempCount > 0){
               message += p.merchandise.name + ' (' + p.tempCount + ') ' ;
               }
            }
        return null;
    }
    
    public void remove(){
     rowz = (Id) ApexPages.currentPage().getParameters().get('rowDel');
        system.debug(rowz);
        if(cart.containsKey(rowz)){
            cart.remove(rowz);
    
            
        }  
         
    }

    public void handleTheBasket(){
        for(DisplayMerchandise c : products){
            if(c.tempCount > 0){
            if(cart.containsKey(c.merchandise.Id)){
                
                cart.get(c.merchandise.Id).count += c.tempCount;
                
            }
            else{
                cart.put(c.merchandise.Id, c);
                cart.get(c.merchandise.Id).count = c.tempCount;
             
          		

            } 
        
        }
        }
        
    }
    
    public Map<Id, DisplayMerchandise> getCart() {
        if(cart == null){
            cart = new Map<Id, DisplayMerchandise>();
 
                }
       
        return cart;
    }

    public class DisplayMerchandise {
        public Merchandise__c merchandise{get; set;}
        public Decimal count{get; set;}
        public Decimal tempCount{get;set;}
        public Integer rowNumber { get; set; }
        public DisplayMerchandise(Merchandise__c item){
            this.merchandise = item;
            
        }
    }

    public List<DisplayMerchandise> getProducts() {
        if (products == null){
            products = new List<DisplayMerchandise>();
    
            for (Merchandise__c item :
            [SELECT id, name, description__c, price__c
            FROM Merchandise__c
            WHERE Total_Inventory__c > 0]) {
           
            products.add(new DisplayMerchandise(item));
            }
        }
        return products;
    }

}

Visualforce
<apex:page standardStylesheets="false" showHeader="false" sidebar="false" controller="StoreFront2">
  <apex:stylesheet value="{!URLFOR($Resource.styles)}"/>
  <h1>Store Front</h1>
   
  <apex:form >
      <apex:dataTable value="{!products}" var="pitem" rowClasses="odd,even">
          
          <apex:column headerValue="Product">
              <apex:outputText value="{!pitem.merchandise.name}" />
          </apex:column>
          <apex:column headervalue="Price">
              <apex:outputText value="{!pitem.merchandise.Price__c}" />
          </apex:column>
          <apex:column headerValue="#Items">
              <apex:inputText value="{!pitem.tempCount}"/>
          </apex:column>
   
      </apex:dataTable>
      
      <br/>
      <apex:commandButton action="{!shop}" value="Add to Cart" reRender="msg,cart">
      
      </apex:commandButton>
  </apex:form>
  
    <apex:outputPanel id="msg">{!message}</apex:outputPanel><br/>    
    <h1>Your Basket</h1>
    
<apex:form>    
     <apex:dataTable id="cart" value="{!cart}" var="carti" rowClasses="odd,even">
			
   <apex:column headerValue="ID" rendered="false">
       <apex:outputText value="{!cart[carti].merchandise.Id}" >
         	<apex:param name='rowDel' value="{!cart[carti].merchandise.Id}" />
       </apex:outputText>
          </apex:column>
          <apex:column headerValue="Product">
              <apex:outputText value="{!cart[carti].merchandise.name}">
          	
         </apex:outputText>
          </apex:column>
          <apex:column headervalue="Price">
              <apex:outputText value="{!cart[carti].merchandise.price__c}" />
          </apex:column>
          <apex:column headerValue="#Items">
              <apex:outputText value="{!cart[carti].count}"/>
          </apex:column>
         <apex:column headerValue="Remove?">
             <apex:commandButton action="{!Remove}" value='Remove' reRender="cart"/>
         </apex:column>
                     

      </apex:dataTable>
    </apex:form>
    
  
</apex:page>

 
Hi,

I am having a flag which is public variable in the class(with sharing). I am assigning values to that variable inside the constructor of that class and I want to check the value of that flag throughout my application(force.com website). But if I try to access it in another class, the value is coming as null. Can anyone help me with this?
I am writing a search popup that when click on the search icon , a popup dialog is opened. From there, i can search account with input text then pass value(account name, account id) back to the main window which is a textInputField
The problem is that, the textInputField in main window is not editable. Please suggest the way to fix. You can see the code below:
<apex:pageBlockSectionItem id="tpbsi">
                    <apex:outputLabel value="Account"/>
                    <apex:outputPanel id="oppnl">
                    	<apex:inputHidden value="{!accountId}" id="targetId"/>
                        <apex:inputText size="40" value="{!accountName}" id="targetName"
                                        onfocus="this.blur()" disabled="false" html-readonly="false"/>
                        <a href="#" onclick="openLookupPopup('{!$Component.targetName}', '{!$Component.targetId}')">
                            <apex:image id="search" url="/s.gif" styleClass="lookupIcon" onmouseover="this.className='lookupIconOn';" onmouseout="this.className='lookupIcon';" />
                        </a>
                    </apex:outputPanel>
</apex:pageBlockSectionItem>
User-added image
 
Hi, Guys.

I need to bind values in tree view based on field in the same object. For eg: I have article object which has a field called special notes. Now the special notes should be the parent in the tree and article should be child. I tried something.

public List<Article__c> articles {get; set;}
    public Map<String, Article__c> articlesMap {get; set;}
    public Hydra_MarshTreeViewController (){
        articles = [ SELECT Id, Name, SpecialisedNotes__c from Article__c ];
        System.debug('Hi' + articles);
        articlesMap = new Map<String, Article__C>();
        for(Article__c article : articles)
        {
            articlesMap.put(article.SpecialisedNotes__c, article);
        }
        System.debug('ArticleMap' +articlesMap);
    }

Here is My VF page:

<apex:repeat value="{!articlesMap}" var="arc">
            <li class="closed"><span class="folder">{!arc}</span>
            <ul>
                <apex:repeat value="{!articlesMap[arc]}" var="c">
                <li><span class="file"><a href="Article?id={!articlesMap[arc]}" target="_blank">{!articlesMap[arc]}</a></span></li>
                </apex:repeat>
            </ul>
        </li>
        </apex:repeat>

Please help me
Hi all,
I created a Email Template by Visualforce.  Then I call a component. Code this:

<apex:component controller="BulkEmailSenderController" access="global">
    <apex:dataTable value="{!selectedOpportunities}" var="s_account">
        <apex:column>
            <apex:facet name="header">Account Name</apex:facet>
            {!s_account.oppObject.Account.Name}}
        </apex:column>
    </apex:dataTable>
</apex:component>

Then I create a send email button. I want set a value in {!selectedOpportunities}. How I can set value in parameter in Salesforce. My function send email:

 Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage(); 
                String[] toAddresses = new String[] {'vopp@systena.co.jp'};
                // Set the paramaters of the email
                email.setTargetObjectId('003N000000Lalmz');
                email.setToAddresses( toAddresses );
                email.setTemplateId('00XN0000000DzEJ');

                // Send the email
                Messaging.SendEmailResult [] r =  Messaging.sendEmail(new Messaging.SingleEmailMessage[] {email});  
Hi

We have a field called "Start date" in Campaign and we wish to trigger an email when the campaign start date has reached. Say if the campaign is created with a start date as 05 oct 2015 and on this date we need to send a email reminder to the owner of the campaign. Any suggestion on how to implement it please?
  • September 24, 2015
  • Like
  • 0
I have a query where I am querying a picklist field to gte specific set of values -
 
WHERE <picklist field> like '%value%'

I have now changed the data type to multi select and query gets failed. 

How to replace the original query so that I can get only s specific set of values from the multi select picklist.
Hi, I'm trying to write into a field, Actuals_P1_MOR__c, the number 100 (for example). This field belong to Pipeline_Item__c object. So, at the end, I update the List pl that is made of Pipeline_Item__c records, in order to update every Actuals_P1_MOR__c.

But I get this error:

System.LimitException: DML currently not allowed 
 
for (Pipeline_Item__c p : pl)
            {
                
                if (p.Actual_P1_MOR__c== null){
                    p.Actual_P1_MOR__c=0;
                }

                if (p.Pipeline__r.CurrencyIsoCode=='USD')
                {
                    p.Rate_to_USD__c=1;

                } else {

                    p.USD_MOR_1__c=morMap.get('January');
                    p.USD_MOR_2__c=morMap.get('February');
                    p.USD_MOR_3__c=morMap.get('March');

                    
                
                 if (p.Pipeline__r.CurrencyIsoCode=='EUR')
                {
                    String cic = 'EUR';
                    
                    p.Rate_to_USD__c= bemap.get(cic);
                   

                }
                else if (p.Pipeline__r.CurrencyIsoCode=='BRL')
                {
                    String cic = 'BRL';
                    
                    p.Rate_to_USD__c= bemap.get(cic);
                }
                else if (p.Pipeline__r.CurrencyIsoCode=='CAD')
                {
                    String cic = 'CAD';
                    
                    p.Rate_to_USD__c= bemap.get(cic);
                }
                else if (p.Pipeline__r.CurrencyIsoCode=='PLN')
                {
                    String cic = 'PLN';
                    
                    p.Rate_to_USD__c= bemap.get(cic);
                }
                else if (p.Pipeline__r.CurrencyIsoCode=='GBP')
                {
                    String cic = 'GBP';
                    
                    p.Rate_to_USD__c= bemap.get(cic);
                }
            }

                if (p.Estimate1__c != null)
                q.Estimate__c += p.Estimate1__c* p.Rate_to_USD__c;

                if (p.Op_P1__c != null)
                q.OP__c += p.Op_P1__c* p.Rate_to_USD__c;

                if (p.Op_P2__c != null)
                q.OP__c += p.Op_P2__c* p.Rate_to_USD__c;

                if (p.Op_P3__c != null)
                q.OP__c += p.Op_P3__c* p.Rate_to_USD__c;

                
                
                if (p.Actual_P1__c != null){                       
                    q.Month1__c += p.Actual_P1__c* p.Rate_to_USD__c;
                    
                    if (p.USD_MOR_1__c != null){
                        
                        q.Month1MOR__c += p.Actual_P1__c*p.USD_MOR_1__c;
                        p.Actual_P1_MOR__c += 100;
                       
                        
                    } else {
                        q.Month1MOR__c = q.Month1__c;

                    }               
                }

                if (p.Actual_P2__c != null){
                q.Month2__c += p.Actual_P2__c* p.Rate_to_USD__c;
                    if (p.USD_MOR_2__c != null){
                        q.Month2MOR__c += p.Actual_P2__c*p.USD_MOR_2__c;
                    } else {
                        q.Month2MOR__c = q.Month2__c;
                    }            
                }
                if (p.Actual_P3__c != null) {
                q.Month3__c += p.Actual_P3__c* p.Rate_to_USD__c;
                    if (p.USD_MOR_3__c != null){
                        q.Month3MOR__c += p.Actual_P3__c*p.USD_MOR_3__c;
                    } else {
                        q.Month3MOR__c = q.Month3__c;
                    }         
               }


            } 

            update pl;             <---------------------------------

Any idea?

Thankyou!
Hi all,

I need to embed my VF Custom Object into my Opportunity Page Layout, but not sure how to accomplish this. I know that the standardController points to the Custom Object, but how do I create a relationship with the Opportunity so that I am able to add it to the Opp Page Layouts? Below is my Controller and VF Code:

Controller: 
public class revRecMultiadd
{
    
    //will hold the rev rec records to be saved
    public List<Revenue_Recognition__c>lstRevRec  = new List<Revenue_Recognition__c>();
    
    //list of the inner class
    public List<innerClass> lstInner 
    {   get;set;    }
    
    //will indicate the row to be deleted
    public String selectedRowIndex
    {get;set;}  
    
    //no. of rows added/records in the inner class list
    public Integer count = 1;
    //{get;set;}
    
    
    ////save the records by adding the elements in the inner class list to lstAcct,return to the same page
    public PageReference Save()
    {
        PageReference pr = new PageReference('/apex/revRecMultiadd');
        
        for(Integer j = 0;j<lstInner.size();j++)
        {
            lstRevRec.add(lstInner[j].revrec);
        } 
        insert lstRevRec;
        pr.setRedirect(True);
        return pr;
    }
        
    //add one more row
    public void Add()
    {   
        count = count+1;
        addMore();      
    }
    
    /*Begin addMore*/
    public void addMore()
    {
        //call to the iner class constructor
        innerClass objInnerClass = new innerClass(count);
        
        //add the record to the inner class list
        lstInner.add(objInnerClass);    
        system.debug('lstInner---->'+lstInner);            
    }/* end addMore*/
    
    /* begin delete */
    public void Del()
    {
        system.debug('selected row index---->'+selectedRowIndex);
        lstInner.remove(Integer.valueOf(selectedRowIndex)-1);
        count = count - 1;
        
    }/*End del*/
    
    
    
    /*Constructor*/
    public revRecMultiadd(ApexPages.StandardController ctlr)
    {
    
        lstInner = new List<innerClass>();
        addMore();
        selectedRowIndex = '0';
        
    }/*End Constructor*/
        


    /*Inner Class*/
    public class innerClass
    {       
        /*recCount acts as a index for a row. This will be helpful to identify the row to be deleted */
        public String recCount
        {get;set;}
        
        
        public Revenue_Recognition__c revrec
        {get;set;}
        
        /*Inner Class Constructor*/
        public innerClass(Integer intCount)
        {
            recCount = String.valueOf(intCount);        
            
            /*create a new account*/
            revrec = new Revenue_Recognition__c();
            
        }/*End Inner class Constructor*/    
    }/*End inner Class*/
}/*End Class*/

VF Code:
<apex:page StandardController="Revenue_Recognition__c" extensions="revRecMultiadd" id="thePage">
<apex:form >
<apex:pageblock id="pb" >
    <apex:pageBlockButtons >
        <apex:commandbutton value="Add" action="{!Add}" rerender="pb1"/>
        <apex:commandbutton value="Save" action="{!Save}"/>
    </apex:pageBlockButtons>
    
        
        <apex:pageblock id="pb1">
            
        <apex:repeat value="{!lstInner}" var="e1" id="therepeat">
                <apex:panelGrid columns="5">
                
                <apex:panelGrid headerClass="Name">
                    <apex:facet name="header">Del</apex:facet>
                    <apex:commandButton value="X" action="{!Del}" rerender="pb1">
                        <apex:param name="rowToBeDeleted" value="{!e1.recCount}" assignTo="{!selectedRowIndex}"></apex:param>
                    </apex:commandButton>
                </apex:panelGrid>   
                
                <apex:panelGrid title="SPD" >
                    <apex:facet name="header">Duration</apex:facet>
                    <apex:inputfield value="{!Revenue_Recognition__c.Duration__c}"/>
                </apex:panelGrid>
                
                <apex:panelGrid >
                    <apex:facet name="header">Start Date</apex:facet>
                    <apex:inputfield value="{!Revenue_Recognition__c.Start_Date_Delivery_Date__c}"/>
                </apex:panelGrid>
                
                <apex:panelGrid >
                    <apex:facet name="header">Name</apex:facet>
                    <apex:inputfield value="{!Revenue_Recognition__c.Name}"/>
                </apex:panelGrid>
            </apex:panelgrid>
        </apex:repeat>
    </apex:pageBlock>
        
</apex:pageblock>
</apex:form>
</apex:page>

Any help is highly apprecitated!! 

Thanks so much,
Heather
I have two currency fields on my campaigns object. If one field is calculated, by default the other is not and has a zero balance.

I need to write a formula that decides when a field is not equal to zero and then performs a calculation on that field.

Here is what I have so far:

IF(NOT(
ISBLANK(First_Time_STI_Total_Cost__c)),
First_Time_STI_Total_Cost__c-Total_Amount_Received__c,
null
)

OR

IF(NOT(
ISBLANK(Repeat_STI_Total_Cost__c)),
Repeat_STI_Total_Cost__c-Total_Amount_Received__c,
null
)
But it doesn't work. Please help.
I'm looking for a help with the formula field based on the following criteria: This is to obtain the correct lable size (A, B, C) depend on product size (16, 32, 48) and number of lines (Line 1, Line 2 ...) used to create a specific label.

IF 'size' is equal 16
AND 'Line 1' does not contain 'N/A'
AND 'Line 2' does not contain 'N/A'
return should be value 'A'
IF 'size' is equal 32
AND 'Line 1' does not contain 'N/A'
AND 'Line 2' does not contain 'N/A'
AND 'Line 3' does not contain 'N/A'
return should be value 'B'
IF 'Size' is equal 32
AND 'Line 1' does not contain 'N/A'
AND 'Line 2' does not conatin 'N/A'
AND 'Line 3' does not contain 'N/A'
AND 'Line 4' does not conatin 'N/A'
return should be value 'C'

Fields Line 1,2,3,4 are picklist field type.
Thank you for any help.

Hello everybody,

     I would like to know how do you check the value of a checkbox (isDone__c), whether it is true or false.
     I have tried this: if(isDone__c)  and I am getting the following error: Condition expression must be of type Boolean.


Thanks for any help,
Vijay,

Hi,
after releasing first version of managed package , we have made changes in product layout but it does not seems to be changed in next released beta version so what is the reason behind it, 
we have also create a permission set on profile but changes can not overrides in next beta version.
so what should we do.?

Thanks in advance

 
Hello,

I have a custom field TEXT__C   Date.
I set some date. its ok untill now.

From the backed i want to reset the date.
TEXT__C  =null; //no error but numm is displyed
 TEXT__C  =' '; //error saying string value cannot be set to date.

i want to set blank value to the date
Hi All 
I am facing problem when creating formula field it showing

You have reached the maximum number of 10 object references 

How to update field value of one object from other object field with some calculation.is it possible using trigger
Hi, 

If I click the save button, the pageblock refreshed but the values still the same.
Could you help me with this error.

Thanks,
Sascha
 
public class VTP21_class {

Public String SelectedUserId {get; set;}
Public String SelectedOppId {get; set;}

Private Opportunity OppSave;

Public List <Opportunity> getOppDList2() {
    List <Opportunity> OppD = [SELECT Id, Name, Amount FROM Opportunity WHERE Id = :SelectedOppId];
        IF (SelectedOppId != NULL) {
            OppSave = [SELECT Id FROM Opportunity WHERE Id = :SelectedOppId];
        }
    RETURN OppD;
} 

Public pageReference getOppDList() {
    getOppDList2(); 
    RETURN NULL; 
}

Public PageReference SaveInlineChanges() {
    UPDATE OppSave;
    RETURN NULL;
}


Public PageReference CancelInlineChanges() {
    RETURN ApexPages.CurrentPage();
}

}
 
<apex:pageblock id="pbOppD" mode="inlineEdit">
    <apex:pageBlockButtons location="top">
        <apex:commandButton action="{!SaveInlineChanges}" value="Save" id="saveButton" rerender="pbOpp ,pbOppD"/> -->
        <apex:commandButton action="{!CancelInlineChanges}" value="Cancel" id="cancelButton"/>
    </apex:pageBlockButtons>
    <apex:pageBlockSection >
        <apex:pageblocktable value="{!OppDList2}" var="OppD">
            <apex:column headervalue="Name">
                <apex:outputfield value="{!OppD.Name}" />
            </apex:column>        
            <apex:column headervalue="Amount">
                <apex:outputfield value="{!OppD.Amount}" />
            </apex:column>
        </apex:pageblocktable>   
    </apex:pageBlockSection>
</apex:pageblock>

 
Hi,

how to add custom button in related list in page layout in salesforce, My button is not showing in avilable buttons, Is this somthing related permission issue. 

Hi Experts,

I have created a custom object which is related to User. One user can have multiple records for the object.

I have created a custom email-template with lead data and custom object data. But when I try to mail a lead, I can select a template but cannot select the custom object record. So the email doesn't get the custom object record.

Can anyone help me out?

 

Thanks & Regards,

Nitesh Saxena

Please suggest me on how to bulkify this code- i get too many soql errors frequently. 
trigger NewUpdateMonthValueOpp1 on Opportunity (before update) {
Integer FiscalYearStartMonth = [select FiscalYearStartMonth from Organization where id=:Userinfo.getOrganizationId()].FiscalYearStartMonth;
   Double Amount4=0;
   Double Amount6=0;
   Double Amount7=0;
   Double Amount8=0; 
   
for(Opportunity  op:Trigger.New)
{
 List<Revenue_Schedule__c> revenueList = new List<Revenue_Schedule__c>();
                     revenueList =[select id,Total_Value_by_Forecast__c,Date__c  from Revenue_Schedule__c
                                  where Date__c = THIS_FISCAL_YEAR and Opportunity_Name__c=:op.id ];  
 
 List<Revenue_Schedule__c> revenueListFY = new List<Revenue_Schedule__c>();
                     revenueListFY =[select id,Total_Value_by_Forecast__c,Date__c  from Revenue_Schedule__c
                                  where Date__c = NEXT_FISCAL_YEAR and Opportunity_Name__c=:op.id ];  
     
List<Revenue_Schedule__c> revenueListFULL = new List<Revenue_Schedule__c>();
                     revenueListFULL =[select id,Total_Value_by_Forecast__c,Date__c  from Revenue_Schedule__c
                                  where Opportunity_Name__c=:op.id ];                                   
 
  for(Integer k=0;k<revenueList.size();k++)
  {
  if(revenueList[k].Total_Value_by_Forecast__c!=null)
    {
    Amount4=Amount4+revenueList[k].Total_Value_by_Forecast__c;
    }
  }
  
    for(Integer l=0;l<revenueListFULL.size();l++)
  {
  if(revenueListFULL[l].Total_Value_by_Forecast__c!=null)
    {
    Amount7=Amount7+revenueListFULL[l].Total_Value_by_Forecast__c;
    }
    Amount8=Amount7+op.Setup_Fee__c;

  }

  for(Integer m=0;m<revenueListFY .size();m++)
  {
  if(revenueListFY [m].Total_Value_by_Forecast__c!=null)
    {
    Amount6=Amount6+revenueListFY [m].Total_Value_by_Forecast__c;
    }
  }                      
  
 op.Current_Year_Fee_Value1__c=Amount4;
 op.Next_FY_Fee_Value__c=Amount6;
  op.Amount=Amount8;
}
}
I have visusalforce button, on click of it navigation should go back to home tab. i.e. /home/home.jsp. I tried this with javascript and pagereference method. With page reference method nothing is happening, but with js it saying "URL no longer exists."  Below is the js i used,
var returnURL;
		window.onload =  function() {
			returnURL = gup('retURL');
		};    
		function redirectBack() {
			window.location.href = '/' + returnURL;
		}
Pagerefernece i used ,
pageRef = new PageReference('/home/home.jsp');
return pageRef;
Any help is appreciated. Thanks in advance.
I have two objects, Account (Std) 2. Airports (Cstm) There is a field in Accounts called 'Airport Supplied'  Question: i would to like retrieve multiple name of airports in the above field E.g.:Airport Supplied = Delhi, Goa, London, Paris Please provide the best advise