M3 Fetch Component
The M3 Fetch component reads data from Infor M3 by running an MI (Management Interface) transaction, and lets you choose exactly which fields it returns. Its main use is to build a lookup: a workflow that other workflows open to let people pick a value, such as a customer or an item, instead of typing it.
M3 Fetch is a VXL Live component: you build it in the Vince Platform workflow editor, and the workflow is used from VXL Live, typically as the provider for a lookup.
How it differs from M3 API
M3 Fetch uses the same editor as M3 API: you pick a transaction, set where each input value comes from, and set the company and division defaults. The differences are:
| M3 API | M3 Fetch | |
|---|---|---|
| Purpose | Read, add, update or delete M3 data | Read M3 data to offer as a lookup |
| Outputs | Every output field of the transaction is available to later steps | You choose the output fields. Only the ones you select are available |
| Adding transactions | + buttons let you insert transactions between others | No + buttons. You add the first transaction from the empty step |
| Save rule | At least one transaction | At least one transaction, and at least one output for each transaction |
A workflow can contain either one M3 API step or one M3 Fetch step, not both.
Set up an M3 Fetch step
- Add an M3 Fetch component to the workflow, after the Trigger. If the workflow has no environment yet, select one first (Select Environment), because the transaction list comes from the environment's M3 connection.
- Click Click here to add first API call, pick a Program and a Transaction, and optionally give it a Name. Select Include general transactions if the transaction you need is a general one.
- Decide how each input is filled in. Select an input (click it) and click the cog icon in the Inputs header. The options are the same as in M3 API. For a lookup, set the fields people should search by to Client: they become the search fields in the lookup window.
- Under Outputs, tick the box next to each field the lookup should return. Hover over the box to see its tooltip: ticked fields are added to the lookup, unticked ones are not. Selected fields are listed first under Outputs.
- Click Save.
Use Configure execution to limit how many rows are returned (Max rows, or Unlimited) and to set default values for M3 Company and M3 Division.
Each transaction needs at least one output. If one has none, the step does not save and shows FETCH: Please configure at least one output per transaction. A step with no transaction at all does not save either (API: Configure at least one Transaction).
Example: a customer list
You want users to pick a customer instead of typing the customer number.
- Add an M3 Fetch step and choose a customer list transaction.
- Set the input Customer name to Client, so the user can search by name.
- Under Outputs, tick Customer number and Customer name.
- Save and activate the workflow.
Another workflow can now use it as a lookup: the user types part of a name, sees the matching customers, and picks one to hand its number back.
Use the workflow as a lookup
Workflows that contain an M3 Fetch step can be chosen as the source of a lookup. In the workflow that needs the lookup, open the Trigger, click Configure lookups, add a lookup and pick the workflow. The list shows only workflows that contain an M3 Fetch step, are active, have no configuration errors, and that you are allowed to edit.
The output fields you selected in the M3 Fetch step are the values the lookup can hand back to the form. The inputs you set to Client are the fields users can search by. Mapping these to the fields of the other workflow is described in Lookup Workflows.
Related
- M3 API: input sources, execution settings and the other options M3 Fetch shares
- Lookup Workflows: connect a lookup to a form field
- M3 Filter: filter the records an M3 step returns