SK SKYVVA Documentation

How to use the API invokeCallout3() to pass data from the screen with Developer Console?

After completing this unit, you’ll be able to:

Introduction

We can pass data from the screen and apex class where the data is going into the mapping instead of coming from the database through the select statement in the interface. The caller is an apex class and uses the class method invokes callout3(). Inside this method, we have a map parameter where the user can pass the  Parameter, Query parameter name/value pair to the method. The map with the key/value he has to build in the apex caller program.

Why and when to use Screen pass data?

We always need to pass the subject Id to select the data from the database. Here the requirement is that the user doesn't want to select data from the database. The data is coming from a screen and they want to make a call to other systems with that data. We have to pass the data which the user enters into a screen to invokeCallout3() They don't want to have the data to be written into a table in Salesforce. Just whatever user enters the screen needs to be put a request for the HTTP callout through the other adapters. In this tutorial, we will use SAP business one adapter to send data by the screen to SAP Business one.

How to use the API invookeCallout 3() to pass data from the screen?

Pre-required

Step1:  Create the Connection destination of Sap Business one.

Step2:  Generate message type of SAP business partners module.

Step3: Create Outbound Interface.

Step4 Create SAP business one Adapter.

Step5: Linked this Adapter with Interface.

Step 6: Callout v3 with a developer console.

[aux_code language="javascript" theme="tomorrow" title="" extra_classes=""]skyvvasolutions.CallOutControl c = new skyvvasolutions.CallOutControl(); c.returnJSONComplete=true; c.actionDoIntegrate=true; c.isCreateMessage=true; Map queryParam = new Map(); Map pathParam = new Map(); Map m=new Map(); pathParam.put('SourceField','Value'); queryParam.put('SourceField','Value'); m.put('SourceField','Value'); c.setPayLoad(m); c.queryParam = queryParam; c.pathParam=pathParam; Listresult=skyvvasolutions.Iservices.invokeCalloutV3('IntegrationName','InterfaceName',NULL,'SYNC',c);[/aux_code]

Open this article in the interactive viewer →