# dynamicsGPCall

## Description

Is a function that needed if user want to use a function from web services.

## 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  | function  | The function from the Web Service to be executed.                         | String    | Yes      |
| 3  | data      | This contains the main parameter in the function being called.            | Object    | Yes      |

## Output

## Callback

## Video

## Example

User wants to call the dynamicsGP Web Service.

### Step

1. Create dynamics GP Connector in Services and define the name, url and timeOut.\
   Name: conn\_gp\
   url: <http://aidemosvr.cloudapp.net:48620/Metadata/Legacy/Full/DynamicsGP.wsdl\\>
   \
   user:AIDEMO\gpadmin\
   password: \*\*\*\*\*\*\*\
   timeOut: 60000

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

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-5ee345190aa7ffbeae29fa9d908480179a53a2d3%2FdynamicsGPCall-step-2.png?alt=media)
3. Define toObject.<br>

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

![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-4bb8a62398bf18c1664bd6a5cacc55de7a736b0a%2FdynamicsGPCall-step-4.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-a0dbbd5c1866f38653c8a0c950817b3141dd41ff%2FdynamicsGPCall-step-5.png?alt=media)

### Result

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

## Links
