To Create a Custom Endpoint
You use the Web Service Endpoints (SM207060) form to create a custom endpoint.
If you need to use a custom endpoint, you can either create an endpoint from scratch or extend an existing endpoint with the needed API. This procedure describes how to create a custom endpoint from scratch. To learn how to extend an existing endpoint, see To Extend an Existing Endpoint.
To Create an Endpoint from Scratch
Note: You can create an endpoint that has the latest version of the contract
only.
- Open the Web Service Endpoints (SM207060) form.
- In the Endpoint Name box, type the name of the new
endpoint. Note: For details on the characters that can be used in the endpoint name and version, see Naming Rules for Endpoints.
- In the Endpoint Version box, type the version of the new endpoint.
- Add the needed entities, fields, and actions to the contract of the created endpoint, as described in the sections below.
- Click Save on the form toolbar.
To Add a Top-Level Entity to the Contract of the Endpoint
- In the Endpoint Name box, select the name of the endpoint to which you want to add an entity.
- In the Endpoint Version box, select the version of the endpoint to which you want to add an entity.
- In the left pane, select the Endpoint node.
- On the toolbar of the left pane, click Insert, and in the
Create Entity dialog box, do the following:
- In the Object Name box, type the name of the
entity. This is the name of the API object that you will use in the code
of your application to work with the entity. Note: For details on the characters that can be used in the entity names, see Naming Rules for Endpoints.
- In the Object Type box, select Top-Level.
- In the Screen Name lookup box, select the form to which the entity should correspond.
- Click OK.
- In the Object Name box, type the name of the
entity. This is the name of the API object that you will use in the code
of your application to work with the entity.
- Add the needed fields, actions, or nested entities to the entity, as described in the sections below.
To Add a Report Entity to the Contract of the Endpoint
- In the Endpoint Name box, select the name of the endpoint to which you want to add an entity.
- In the Endpoint Version box, select the version of the endpoint to which you want to add an entity.
- In the left pane, select the Endpoint node.
- On the toolbar of the left pane, click Insert, and in the
Create Entity dialog box, do the following:
- In the Object Name box, type the name of the
entity. This is the name of the API object that you will use in the code
of your application to work with the entity. Note: For details on the characters that can be used in the entity names, see Naming Rules for Endpoints.
- In the Object Type box, select Report.
- In the Screen Name lookup box, select the report to which the entity should correspond.
- Click OK.
The Fields tab is populated with the fields for each parameter of the report.
- In the Object Name box, type the name of the
entity. This is the name of the API object that you will use in the code
of your application to work with the entity.
- Optional: Modify the list of fields, as described in To Add Fields to an Entity.
To Add a Linked or Detail Entity to Another Entity
- In the Endpoint Name box, select the name of the endpoint to which you want to add an entity.
- In the Endpoint Version box, select the version of the endpoint to which you want to add an entity.
- In the left pane, select the entity node to which you want to add a linked or detail entity.
- On the toolbar of the left pane, click Insert.
- In the Field Name box of the Create
Entity dialog box, which opens, type the name of the field that
should be used to access the nested entity, and specify the values of other
elements in one of the following ways:
- If you want to insert an entity that already exists in the contract, select the Use Existing Entity check box, and select the needed entity in the Entity Type box.
- If you want to insert a new entity, in the Object Name box, type the name of the entity, and in the Object Type box, select the type of the entity: Linked or Detail.
Note: For details on the characters that can be used in the entity names, see Naming Rules for Endpoints. - Click OK. The new entity appears in the contract.
- Add fields to the created entity, as described in the following section.
To Add Fields to an Entity
- In the Endpoint Name box, select the name of the endpoint to which you want to add an entity.
- In the Endpoint Version box, select the version of the endpoint to which you want to add an entity.
- In the left pane, select the entity node to which you want to add fields.
- On the Fields tab of the right pane, do one of the
following:
- Click Populate on the tab toolbar. In the Populate Fields dialog box, select the MYOB Acumatica object whose fields you want to include in the entity and the fields that you want to include, and click OK. The selected fields are added to the contract.
- Click Add Row on the tab toolbar; then type the name of the new field in the Field Name column of the added row, select the MYOB Acumatica object whose field you want to include in the entity in the Mapped Object column, and select the field that you want to include in the Mapped Field column.
Note:- For some fields to be included in the entity, the corresponding MYOB Acumatica feature or features must be enabled on the Enable/Disable Features (CS100000) form. For information on MYOB Acumatica basic functionality and add-on features, see Preparing an Instance: MYOB Acumatica Features.
- For details on the characters that can be used in the field names, see Naming Rules for Endpoints.
- Click Save on the form toolbar.
To Add an Action to an Entity
Note: You can add actions that are performed
on multiple records (such as the removal of all records or those the user selects)
to processing forms only. Actions that can be performed on multiple records are not
supported for data entry and maintenance forms.
- In the Endpoint Name box, select the name of the endpoint to which you want to add an entity.
- In the Endpoint Version box, select the version of the endpoint to which you want to add an entity.
- In the left pane, select the Actions node in the needed entity.
- On the toolbar of the left pane, click Insert.
- In the Create Action dialog box, which opens, select the
needed MYOB Acumatica action, type the name that should be used to invoke this action through the
API, and click OK. The dialog box is closed, and the new
action is added to the contract.Note: For details on the characters that can be used in the action names, see Naming Rules for Endpoints.
- If the action has parameters, add the parameters to the action as follows:
- In the left pane, click the action you have created.
- On the Parameters tab of the right pane, do one
of the following:
- Click Populate on the tab toolbar. In the Populate Fields dialog box, which opens, select the MYOB Acumatica object whose fields you want to use as parameters of the action and the fields that you want to use as parameters, and click OK. The selected fields are added to the contract.
- Click Add Row on the tab toolbar; then type the name of the new parameter in the Parameter Name column of the added row, select the MYOB Acumatica object whose field you want to use a parameter of the action in the Mapped Object column, and select the field that you want to use as a parameter in the Mapped Field column.
Note:- For details on the characters that can be used in the parameter names, see Naming Rules for Endpoints.
- If you need to add parameters of a workflow action, select the Transition Parameters object as the object whose fields you want to use as parameters. For details about workflow actions, see Action Configuration: General Information.
- On the form toolbar, click Save.