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
KrishnakumarJKrishnakumarJ 

Calling methods from java class and bind the results in APEX page?..

FileName : Sample.java
import com.sforce.soap.partner.*;
import com.sforce.ws.*;

 

public class Sample{
public List getAccountDetails() {
ConnectorConfig config = new ConnectorConfig();
config.setUsername(username); config.setPassword(password);
connection = Connector.newConnection(config);
//Fetching Account Details
}

How to invoke this getAccountDetails() function in APEX page?...

Any help is appreciated.

jhenningjhenning
You can only call other Apex methods within Apex pages, not Java. You call call the getAccountDetails if you exposed it as a webservice and called the webservice from a Visualforce page.