Tutorial

  1. Home
  2. Docs
  3. Tutorial
  4. 10. How to use message reprocessing?
  5. 10.1 How to do invoke callout by using Auto mode?

10.1 How to do invoke callout by using Auto mode?

Learning Objectives:-

This unit describes:-

  • Describe What is Invoke callout Auto mode?
  • Comfortably use the Invoke callout method.

Introduction:-

This tutorial explains the configuration of invoking callout Auto mode using the future and the batch processing. It describes the process of performing this operation by executing the syntax in the apex code.

What is Invoke callout Auto mode?

Invoke callout Auto mode is one type of callout that split records to callout as FUTURE and BATCH Processing. The future method used to callout for 10 per transaction, however, the performance has been enhanced to do 100 callouts per execution. For the remaining records, BATCH Job will carry on the performance.

 Why is the skyvva callout method?

The callout methods are using to send data from salesforce to external system (SFDC to SAP/SAP-PI) through interface outbound. The Service only sends one record/children per request to SAP. To invoke callout from apex trigger the method invokeCallout(interfaceId, ids, ‘AUTO’) is recommended.

 Pre-Requisite:-

  1. Create Integration.
  2. Create Adapter.
  3. Create Interface.
  • Interface Direction- Outbound
  • Processing Mode- Asynchronous
  • Link Adapter.
  • Do mapping.

The configuring of Invoke callout:-

To do invoke callout, the user can follow the step given below:-

Step 1:- Login to Salesforce and enter the developer console.

 

Step 2:- Select the debug and Open Execute Anonymous Window.

 

Step 3:- Enter Apex code in open window then Execute the code.

Note:- The callouts above is just an example to demonstrate for the user. The following syntax is apex code which you can use, however, you can change the Integration name, Interface name which is in red letters.

Apex Code is given below:-

skyvvasolutions.CallOutControl c=new skyvvasolutions.CallOutControl();
c.returnxml=true;
c.returnListRecord=true;
c.iscreatemessage=true;
List<String> lId = new List<String>();
for(Account a : [SELECT Id FROM Account]){
lId.add(a.Id);
}
skyvvasolutions.IServices.invokeCallout2(‚Invoke_Callout‘,’Account‘,lId, ‚AUTO‘, c);

To check the result:-

You can check the result in Apex Jobs.

 

Was this article helpful to you? Yes No

How can we help?