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
Himanshu vermaHimanshu verma 

Calling metadata webservice via apex.

have created a webservice using metadata api in which i create a object in my salesforce org now i want to call this webservice in another salesforce org but i get webservice call out error everytime i execute it in my developer console.

Error -- Web service callout failed: WebService returned a SOAP Fault: System.CalloutException: Callout loop not allowed Class.MetadataService.MetadataPort.create
Hi HImanshu,

While searching for this issue, I came across a user who faced a similar issue bacause a Call out cannot reference an object in another ORG - the workaround provided was to either use BATCH APEX or scheduler to perform the task  asynchronously
Himanshu vermaHimanshu verma
Hi sonam,

can u please explain it more clearly...? beacause here i am creating object using metadata api.