# navCall

## Description

Creates a connection with a navConnector.

## Input / Parameter

| Name        | Description                                                           | Input Type  | Default | Options | Required |
| ----------- | --------------------------------------------------------------------- | ----------- | ------- | ------- | -------- |
| connector   | The name of the navConnector created in Services to connect to.       | String/Text | -       | -       | Yes      |
| type        | The type of connection.                                               | String/Text | -       | -       | No       |
| ent?        |                                                                       | String/Text | -       | -       | Yes      |
| function    | The function from the web service to be executed.                     | String/Text | -       | -       | Yes      |
| subfunction | The subfunction from the web service to be executed.                  | String/Text | -       | -       | No       |
| data        | The data containing the main parameters in the function being called. | Object      | -       | -       | Yes      |
| extra       | Extra parameters stored and passed to callback.                       | Any         | -       | -       | No       |
| batch?      |                                                                       | String/Text | -       | -       | No       |

## Output

N/A

## Callback?

### callback

The function to be executed if the connection to navConnector is successful.

### errCallback

The function to be executed if the connection to navConnector is not successful.

## Video

Coming Soon.

## Example

The user wants to call the navCall Web Service.

### Step

1. Create a NAV Connector in Services with the follow parameters.

   | Field    | Value                                       |
   | -------- | ------------------------------------------- |
   | Name     | nav                                         |
   | Url      | <http://203.116.137.100:8047/DynamicsNAV90> |
   | Company  | CRONUS Australia Pty. Ltd.                  |
   | User     | chh\mobuser                                 |
   | Password | \*\*\*\*\*\*\*\*                            |
   | Timeout  | 30000                                       |

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

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

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-763fe5be3e48df129f55cc7e7d809672b2bebd02%2FnavCall-step-3.png?alt=media)
3. 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-c91440e99bc570f774a89ef5e094ee29ee220e88%2FnavCall-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-28393f1c1f40780ce856827963088f860d3f60a1%2FnavCall-result-1.png?alt=media)

## Links
