How to select a specific Landed Cost Driver when the code is duplicated (Find popup won't trigger via API)? — P21 21.1.4524

I’m working on the addition of Landed Cost Driver rows to a Purchase Order via the API on P21 version 21.1.4524. Adding a row works; my problem is selecting the correct driver when two drivers share the same code.

What works

Adding a new row to the Landed Cost tab succeeds. Using m_add via POST /v2/tools on datawindow tabpage_landed_cost, I get a new empty row (TotalRows increments, the new empty _internalrowindex row is present on GET /v2/data). Setting a unique driver code into landed_cost_driver_cd via PUT /v2/change resolves fine and the row populates.

The problem

When the driver code is not unique, it fails. In our company (1234) the code DUTY 1.4+50 maps to two drivers:

  • DUTIES, multiplier 0.019, Landed Cost Driver Uid 112
  • TARIFFS, multiplier 0.5, Landed Cost Driver Uid 133

An error has occurred accessing landed cost driver %s information. Potential reasons: 1) not valid for the specified company 2) does not exist 3) has been deleted.

In the desktop GUI, the same action does NOT fail — typing the code and pressing Enter opens a “Find Landed Cost Driver” popup that lists both rows (including the Uid column) and lets the user pick one.

What I’ve tried / ruled out

  1. No Find tool exists. I enumerated tools via GET /v2/tools at window, datawindow, and field level (fieldName=landed_cost_driver_cd, row=2). The field-level tools are only: m_insert, m_add, m_delete, m_recalculatelandedcost, m_showdriversextendedinfo, m_edit, m_translate, m_dcp (DynaChange), plus MyMenu/Tasks/Help. There is no m_find / m_search / m_zoom to open the lookup popup.
  2. PUT /v2/change does not auto-open the popup (with ResponseWindowHandlingEnabled: true) — it just returns Failure, never Status: 3 / windowopened. So I never get a responseWindowId for the Find window.
  3. UID into the code field failslanded_cost_driver_cd = "112" errors with “accessing landed cost driver 112”, i.e. the field only accepts the code, not the UID.
  4. Transaction API (PurchaseOrder service) — the landed cost line element TABPAGE_LANDED_COST.tabpage_landed_cost only exposes landed_cost_driver_cd, landed_cost_driver_desc, application_point_cd, payable_to, multiplier, calculation_method, dollar_amount, landed_cost_amt, currency_id, tax_driver_flag. There’s no category / driver_type / UID field on the PO line to disambiguate, so a duplicate code can’t be resolved here either.

My questions

  1. Is there any way via the Interactive API to programmatically open the “Find Landed Cost Driver” popup (i.e. simulate the Enter/AcceptText that the GUI does), so I can read it, select the correct row by Uid, and click OK?
  2. If not, is there a field on the PO landed cost line (visible or hidden) that accepts the driver UID directly, so the lookup is bypassed?
  3. Is the only reliable approach to ensure unique landed cost driver codes, or is there a supported pattern (DynaChange popup suppression, stored procedure, etc.) for selecting among same-coded drivers via API?

Any guidance appreciated. Happy to share full request/response payloads.