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

windowpopup to update record data (help me)

<apex:page controller="OppNameSearchController" >
    <apex:form id="form">
              <apex:pageBlockSection title="Search Filter" >
                Opportunity Name: <apex:inputText value="{!Name}"/>
                <apex:commandButton value="Search" action="{!method}" />
            <apex:pageMessages ></apex:pageMessages>
<apex:pageBlockTable value="{!Opp}" var="row" rendered="{!show}">
<apex:column >
<apex:outputLink title="" value="/{!}/e?retURL=/apex/{!$CurrentPage.Name}" style="font-weight:bold">Edit</apex:outputLink>&nbsp;|&nbsp;

    <script type="text/javascript">
    function popupwindow()
        var newwindow ='/apex/OppNameSearchController','newwindow','height=400','width=1000','left=100','top=100'); 
    <apex:commandButton action="{!edit}" value="edit" onclick="popupwindow()"/>   
            <apex:column value="{!row.Name}"/>
            <apex:column value="{!row.Amount}"/>
public class OppNameSearchController {
    public list<Opportunity>Opp{set;get;}
    public string Name{set;get;}
    public Decimal amount{set;get;}
    public boolean show{set;get;}
    public OppNameSearchController()
        Opp = new List<Opportunity>();
        Opp= [select id, Name, Amount from Opportunity];
    public void method()
        integer OppCount=[select count() from Opportunity where Name LIKE: Name+'%'];
        if(OppCount != 0)
            Opp = [select  name, Amount from Opportunity where Name LIKE: Name+'%' ];
            show = true;
            ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.INFO,'There are no Opportunities with the Name -'+Name);
            show = false;
    public void save()
        update Opp;
     public void edit()
     String oppid= ApexPages.currentPage().getParameters().get('oppid'); 
     public void clear(){  	

Hi sales@myvarma,

What is the issue in this??

Sagar Sindhi