Skip to main content

Data mapping dependencies and troubleshooting

Use a mapping's query, model and lock information to investigate configuration problems.

N
Written by Niyaz

Use a mapping's query, model and lock information to investigate configuration problems.

The dependency chain

A data mapping connects a basic query with an API model, and an API endpoint requires a data mapping.

The side menu has separate entries for Basic queries, Data Mappings and API Endpoints.

Client connections and basic queries

A basic query's filter determines which ERP records it requests. The basic query record includes a Select connection picker. The Basic queries list shows each query's name and its connection or company. The Basic query field on the data mapping create form is marked required.

Data mappings

Use a data mapping to associate a basic query with an API model. The create form has Name, Api model, Basic query and User query fields. On the empty create form, Save is unavailable. Save becomes available after you change field values on the form.

API endpoints

The create form has required Data mapping and Api function selectors. On the empty form, Api function and Save are unavailable. The mapping record identifies use by an API endpoint as the reason for its lock. The Grouped tab on API Endpoints organizes endpoints by function, with Data mapping and Query columns in the endpoint tables.

How locking works

The alert reads Data mapping is locked due to it's used in API Endpoint. While the alert is shown, Save is unavailable on the record. The Response Preview, Logic Rules, Relation and Api Preview tabs remain accessible from the locked record.

Data mapping record with a lock alert, five tabs and an unavailable Save button

The basic query record then shows Basic Query is locked due to it's used in API Endpoint. On that record, the Basic Query Name, Select connection and Select ERP Entity fields and the REST API switch are unavailable.

The five tabs and what each one tells you

The data mapping record has five tabs: General Info, Response Preview, Logic Rules, Relation and Api Preview. Use these tabs to inspect different parts of the mapping configuration.

General Info shows read-only Name, Erp model, Api model and Basic Query values, followed by the Metadata area. The basic query appears as a link. This is the first place to check when you suspect the wrong query is attached to a mapping. In Metadata, Insert metadata template is unavailable while Mapping is locked appears.

Response Preview has a View button.

Logic Rules has a Data Mapping Logic Rules list and a Clear filters button. Use Logic Rules to inspect the mapping's rules.

Relation shows a Data Mapping Lines table with Api Name, Response Name, Match, Erp logic rule and Data mapping logic rule columns. Use Relation to compare API names with response names and inspect their associated rules.

Api Preview has a View button. Use the preview to investigate unexpected query results.

Diagnosing common problems

  • For unexpected query results, inspect filters that contain a # character or use negation. In General Info, check Basic Query to identify the query attached to the mapping.

  • For suspected field pairing problems, compare Api Name and Response Name in Relation. Check the Erp logic rule and Data mapping logic rule columns for the field pairings you are investigating.

  • On a locked mapping, the alert names use by an API endpoint as the lock reason, and Save is unavailable.

  • When preparing a new mapping, account for the required Basic query and User query fields.

Basic query filters that contain a # character

ERP Manager encodes a # character inside a basic query's filter before the request reaches the ERP, so the ERP receives the whole filter. A filter that already contains the encoded form is not encoded a second time. The encoding applies to every ERP connection, and to previews as well as to synchronization. Before this fix, a # character cut the filter short, the ERP rejected the request, previews returned an empty data set, and the sync task could still report Success.

Negated basic query filters

ERP Manager preserves negation when saving a basic query filter, including filters with one row or several rows. Earlier, saving could discard negation and return the records the filter was intended to exclude. This correction applies to Priority and SAP B1; Business Central rejects negated filters.

Metadata compatibility

Metadata templates provide a starting structure for supported mapping configuration. A template must match the mapping's API model to have its intended effect. Saving metadata alone does not establish that it affects the integration: unsupported content can be retained without being used.

Related

Did this answer your question?