• Rakhesh T
  • NEWBIE
  • 10 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 1
    Replies
Is it possible to write a Batch Apex without Finish() method?

if yes, please explain.
I ma new to salesforce. Can anyone please tell what exactly is a sales process and i twould be of great help if you can provide relavent documents.
Helloo....
I have created a VF page for a Controller with remote action method. I am not able to get the call back to javascript function and display the result in output text field of  Page block section.Can anyone please help me resolve the issue. Please find VF code and Apex code below:

Apex Code:

public class RemoteFunction1CNTRL{
@RemoteAction
public static Account call(string accname){
 Account acc = [select id,name,phone from Account where name=:accname];
 return acc;
}
}

VF code:

<apex:page controller="RemoteFunction1CNTRL">
<apex:form id="fm">
<script>
function myfun(){
alert('Script function called');
var name = document.getElementById("{!$Component.pb1.it}").value;
alert('Searching for:'+''+name);

RemoteFunction1CNTRL.call(name,handleResponse,{escape:true});

function handleResponse(result,event){
alert('sobject:'+ result);
document.getElementById("{!$Component.pb2.sid}").innerHTML=result.Id;
document.getElementById("{!$Component.pb2.sname}").innerHTML=result.Name;
document.getElementById("{!$Component.pb2.sphone}").innerHTML=result.Phone;
}
}
</script>
<apex:pageBlock id="pb1">
<apex:inputText id="it"/>
<apex:commandButton value="Click" onclick="myfun();"/>
</apex:pageBlock>

<apex:pageBlock id="pb2">
<apex:outputText id="sid"/><br/>
<apex:outputText id="sname"/><br/>
<apex:outputText id="sphone"/><br/>
</apex:pageBlock>

</apex:form>  
</apex:page>
I ma new to salesforce. Can anyone please tell what exactly is a sales process and i twould be of great help if you can provide relavent documents.
Helloo....
I have created a VF page for a Controller with remote action method. I am not able to get the call back to javascript function and display the result in output text field of  Page block section.Can anyone please help me resolve the issue. Please find VF code and Apex code below:

Apex Code:

public class RemoteFunction1CNTRL{
@RemoteAction
public static Account call(string accname){
 Account acc = [select id,name,phone from Account where name=:accname];
 return acc;
}
}

VF code:

<apex:page controller="RemoteFunction1CNTRL">
<apex:form id="fm">
<script>
function myfun(){
alert('Script function called');
var name = document.getElementById("{!$Component.pb1.it}").value;
alert('Searching for:'+''+name);

RemoteFunction1CNTRL.call(name,handleResponse,{escape:true});

function handleResponse(result,event){
alert('sobject:'+ result);
document.getElementById("{!$Component.pb2.sid}").innerHTML=result.Id;
document.getElementById("{!$Component.pb2.sname}").innerHTML=result.Name;
document.getElementById("{!$Component.pb2.sphone}").innerHTML=result.Phone;
}
}
</script>
<apex:pageBlock id="pb1">
<apex:inputText id="it"/>
<apex:commandButton value="Click" onclick="myfun();"/>
</apex:pageBlock>

<apex:pageBlock id="pb2">
<apex:outputText id="sid"/><br/>
<apex:outputText id="sname"/><br/>
<apex:outputText id="sphone"/><br/>
</apex:pageBlock>

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