# sageCall

## Description

Is a function that are needed when user want to use sage table.

## Input / Parameters

| No | Name      | Description                                                               | Data Type | Required |
| -- | --------- | ------------------------------------------------------------------------- | --------- | -------- |
| 1  | connector | Name of connector and created in the Services and Global Components page. | String    | Yes      |
| 2  | ent       | Name of Sage table                                                        | String    | Yes      |
| 3  | function  | The function from the Web Service to be executed.                         | String    | Yes      |
| 4  | data      | This contains the main parameter in the function being called.            | Object    | No       |
| 5  | extra     |                                                                           |           | No       |

## Output

## Callback

## Video

## Example

The user wants to use Sage table.

### Step

1. Create SAGE Connector in Services and define the name, url and timeOut.\
   Name: conn\
   url: <http://sage300demo.sageasiapac.com\\>
   basepath: /Sage300WebApi\
   apiVersion: 1.0\
   tenant: -\
   company: SAMLTD\
   user: DEMO\
   password: \*\*\*\*\
   timeOut: 30000

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-5e6bd372df56f3bac365e223f20137620fd737c3%2FsageCall-step-1.png?alt=media)
2. Make sure Sage table exist inside the services.

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-d4ee1114b335a2ca21be966ad67130bebbd86417%2FsageCall-step-2.png?alt=media)
3. Call the function "sageCall".

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-91b703b03b9b1a026892d9038c42990d23652ecb%2FsageCall-step-3.png?alt=media)
4. Add a console after callback function for display response from console.

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-f32ff8bbdcbbbf2498127cb962f04527b89d827b%2FsageCall-step-4.png?alt=media)

### Result

![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-25eec8f9da2a96d5144241f1bcc894172bb8246a%2FsageCall-result-1.png?alt=media)

## Links

* N/A
