Skip to content

Comments

Feature/118 optional customer table relation#119

Open
amulaj wants to merge 7 commits intodirections4partners:mainfrom
amulaj:feature/118-optional-customer-table-relation
Open

Feature/118 optional customer table relation#119
amulaj wants to merge 7 commits intodirections4partners:mainfrom
amulaj:feature/118-optional-customer-table-relation

Conversation

@amulaj
Copy link

@amulaj amulaj commented Feb 6, 2026

This pull request introduces integration with Microsoft Sales Customer records in the CCMS customer table and improves the setup record loading pattern. The main changes enable users to look up and populate customer data from Microsoft Sales Customers, add a new configuration option to control this feature, and optimize how setup data is accessed.

Integration with Microsoft Sales Customer:

  • Added a new field "Use Microsoft Sales Customer" to the D4P BC Setup table and page, allowing administrators to enable or disable Microsoft Sales Customer integration. [1] [2]
  • Implemented the LookupSalesCustomer procedure, which opens a lookup dialog for Microsoft Sales Customers and populates the CCMS customer record with selected data if the feature is enabled. [1] [2]
  • Added the PopulateFromSalesCustomer procedure to copy relevant fields from a Microsoft Sales Customer record to the current CCMS customer record.

Setup record loading improvements:

  • Replaced direct calls to CCMSSetup.Get() with a new GetCCMSSetup() procedure that uses lazy-loading to avoid redundant setup record retrievals. [1] [2] [3] [4]

Namespace and dependency updates:

  • Added the using Microsoft.Sales.Customer; statement to support Microsoft Sales Customer integration.

Closes #118

Copilot AI review requested due to automatic review settings February 6, 2026 13:03
@CLAassistant
Copy link

CLAassistant commented Feb 6, 2026

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request introduces optional integration with Microsoft Sales Customer records for the CCMS customer table and implements a lazy-loading pattern for setup record retrieval. The implementation diverges from the original issue request by using a lookup-based approach with data population instead of a TableRelation property.

Changes:

  • Added a "Use Microsoft Sales Customer" boolean field to the setup table and page to control the integration feature
  • Implemented customer data lookup and population from Microsoft Sales Customer records through OnLookup trigger and supporting procedures
  • Replaced direct CCMSSetup.Get() calls with a custom GetCCMSSetup() lazy-loading method

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
CCMS/src/Setup/D4PBCSetup.table.al Adds "Use Microsoft Sales Customer" configuration field to control integration
CCMS/src/Setup/D4PBCSetup.page.al Exposes new configuration field in the setup page UI
CCMS/src/Customer/D4PBCCustomer.table.al Implements lookup-based integration with Microsoft Sales Customer and custom setup loading pattern

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@freddydk
Copy link
Contributor

freddydk commented Feb 6, 2026

Pls. resolve and sign the CLA, thanks

@amulaj
Copy link
Author

amulaj commented Feb 7, 2026

@freddydk the CLA is now signed and the PR comments resolved.

Copilot AI review requested due to automatic review settings February 7, 2026 09:59
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@amulaj amulaj requested a review from fvet February 20, 2026 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Customer No. with TableReleation property

5 participants