[GB] IdealPostcodes provider is unusable through the Postcode Service Manager framework
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
Research direction
Start with src/Apps/GB/IdealPostcodes/IPCProvider.Codeunit.al and compare OnDiscoverPostcodeServices and OnRetrieveAddress with the GetAddress.io provider and page 9143's stored service key. Review the proposed regression test for the configuration path and verify address selection against the production API behavior. Done means IdealPostcodes remains selected, IsConfigured() is true, and confirming an entry writes the selected address back.
Written by the indexing model from the issue text.
Description
Describe the issue
Reported by a BC partner who tried to integrate with IdealPostcodes as a postcode provider through the Base Application's Postcode Service Manager framework. Two defects in src/Apps/GB/IdealPostcodes make the provider unusable on that path (the app's own page extensions are unaffected — they call the provider directly):
-
The provider cannot be selected.
IPCProvider.Codeunit.al(OnDiscoverPostcodeServices) registers the display nameIdealPostcodesinNameand the keyIDEAL_POSTCODE_POSTCODE_SERVICEinValue— swapped relative toPostcodeServiceManager.RegisterServiceand to the other provider (GetAddress.io). Page 9143 "Postcode Configuration Page W1" saves the selected row's Name as the service key, so every subscriber guard (if ServiceKey <> MyServiceKeyTok then exit;) rejects the stored key,PostcodeServiceManager.IsConfigured()returns false, and page 9143'sOnOpenPageresets the stored selection toDisabledon every open. -
The selected address is never returned.
OnRetrieveAddressre-fetches the picked entry viaGetAddressDetailsfromhttps://api.ideal-postcodes.co.uk/v1/<id>— a route the Ideal Postcodes API does not have (404; we are the API vendor and can confirm it never existed) — andParseAddressDetailexpects fields (address,address2,city, …) the API never returns. Every framework lookup ends with "Failed to retrieve address details."
Expected behavior
Selecting IdealPostcodes on the Postcode Service configuration page persists, IsConfigured() reports true, and confirming an entry on the "Postcode Select Address" page writes that address back.
Proposed fix (implemented, verified live on a BC 28.2 sandbox against the production Ideal Postcodes API)
- Accept both the token and the (locked) display name as the service key.
- In
OnRetrieveAddress, re-run the search for the entered postcode/city and return the entry matching the selectedAddress ID(falling back toDisplay Text) instead of calling the nonexistent endpoint; this also makes the "Remove Organisation Name" setting apply to the written-back address. - Remove the dead
GetAddressDetails/ParseAddressDetail. - Regression test that stores the key exactly the way page 9143 does and asserts
IsConfigured().
A PR with this change is ready on branch sergey-idealpostcodes:fix/gb-idealpostcodes-service-key-and-retrieve-address and will be opened once this issue is approved.
- Dominant language
- AL
- Stars
- 683
- Forks
- 459
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 621
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/BCApps
-
Team: Finance
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Approved event-request ext-ready-to-implement Team: Finance
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Approved event-request ext-ready-to-implement Team: SCM
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
event-request Team: SCM
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Team: SCM
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
All issues in microsoft/BCApps
Similar issues
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100