BCApps icon indicating copy to clipboard operation
BCApps copied to clipboard

[Bug]: Pay-to Name 2 is editable on other conditions than all other Pay-to fields

Open Franco111000 opened this issue 4 months ago • 1 comments

Describe the issue

This is the purchase-side counterpart of #8312.

On the Purchase Quote, Purchase Order, and Purchase Invoice pages, the field "Pay-to Name 2" is only editable when the Pay-to option is "Another Vendor":

Editable = PayToOptions = PayToOptions::"Another Vendor";
Enabled = PayToOptions = PayToOptions::"Another Vendor";

Every other field in the pay-to address group (Address, Address 2, City, County, Post Code, Country/Region Code, Contact No., Contact) uses:

Editable = (PayToOptions = PayToOptions::"Custom Address") or (Rec."Buy-from Vendor No." <> Rec."Pay-to Vendor No.");

So with "Custom Address" selected, the whole pay-to address group can be filled in except "Pay-to Name 2". Like its sales counterpart, the field appears to have been missed when the PayToOptions editability logic was applied to the pay-to address group. "Pay-to Name 2" on the Purchase Header is a plain text field with no validation logic and no table relation.

The Blanket Purchase Order, Purchase Credit Memo, and Purchase Return Order pages have no PayToOptions-based conditions on this field and are not part of this issue.

Expected behavior

When selecting "Custom Address" in the Pay-to section of a purchase document, the "Pay-to Name 2" field should be editable under the same conditions as all other pay-to address fields.

Steps to reproduce

  1. Create a purchase document (e.g. Purchase Order)
  2. Select "Pay-to" -> "Custom Address"
  3. Try to enter a different Pay-to Name 2

Additional context

The sales side is being fixed in #9096. The same correction can be applied here: give "Pay-to Name 2" the same Editable and Enabled expression as its sibling fields on the three affected pages, propagate to the localization layers that carry copies of these pages, and extend the existing CustomAddressPayToOption tests.

I will provide a fix for a bug

  • [x] I will provide a fix for a bug

Franco111000 avatar Jul 05 '26 10:07 Franco111000

:robot: AI triage completed. Product group, please validate the triage report (Microsoft internal access only, use Ctrl+Click to open in new tab).


Was this triage helpful? React with :thumbsup: or :thumbsdown: on this comment to provide feedback.

github-actions[bot] avatar Jul 05 '26 10:07 github-actions[bot]