You need to sign in to do that
Don't have an account?
Pavan Renjal
Inline VF page displayed in a different page after clicking on Save button
I am displaying set of Opportunities in Inline VF page related to a account in Account detail page. However on saving, the Inline VF page opens seperately in new browser Tab. I want avoid this from happening and i want only the updated records to be saved. Please suggest if i am doing anything wrong here.
I have displayed only a section of apex and visualforce code here:
public void mySave() { try { for(Integer i=0;i<OpptyGetChanged.size();i++) { if(Oppty[i].StageName!=OpptyGetChanged[i].StageName || Oppty[i].Description!=OpptyGetChanged[i].Description) { OpptyToBeUpdated.add(Oppty[i]); } } update OpptyToBeUpdated; ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.CONFIRM,'Record Saved Successfully!'); ApexPages.addMessage(myMsg); } catch(DMLException e) { ApexPages.addMessages(e); } }
<apex:pageBlockButtons> <apex:commandButton action="{!mySave}" Value="Save"/> </apex:pageBlockButtons>