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
hegde_hegdekhegde_hegdek 

calling a apex class from a another salesforce instance

Hello,

Is there a way to call an apex class from another salesforce instance.

regards

kaushik

Alok_NagarroAlok_Nagarro

Hi,

 

Are you talking about call a apex class of one org, from another org ?

if yes, then you can use webservice API, for that you'll have to write a global class that will have webservice method.

And then you can call these methods( i.e. callout).

 

Thanks,

gv007gv007

If you want call an apex class A that is exist ing an SFDC instance a@salesforce.com in b@salesforce.com ?.For that

 

STep1: Create Apex class A in a@salesforce.com

Step2: Generate WSDL of class A from a@salesforce.com

Step3.Save the WSDL some where in yours computer

Step4:Login SFDC instance b@salesforce.com

Step5:go develop-->apexclass-->generate from wsdl -->generate new class using class a wsdl.This is one of the way .If yours problem is simple.

Thanks

Gopi

 

Ravi KothariRavi Kothari
can i do this with S2S connection rather calling Webservices API ?