Skip to content

Comments

#125 Partner center#129

Open
Berno82 wants to merge 6 commits intodirections4partners:mainfrom
Berno82:Partner-Center
Open

#125 Partner center#129
Berno82 wants to merge 6 commits intodirections4partners:mainfrom
Berno82:Partner-Center

Conversation

@Berno82
Copy link

@Berno82 Berno82 commented Feb 23, 2026

Fixes #125
In case customers are spread over more Partner centers this is adding the possibility to map a customer to a Partner Center.

@CLAassistant
Copy link

CLAassistant commented Feb 23, 2026

CLA assistant check
All committers have signed the CLA.

@Berno82 Berno82 marked this pull request as draft February 23, 2026 11:21
@Berno82 Berno82 marked this pull request as ready for review February 23, 2026 11:22
@Berno82 Berno82 changed the title Issue #125 Partner center Fixed Issue #125 Partner center Feb 23, 2026
@Berno82 Berno82 changed the title Fixed Issue #125 Partner center #125 Partner center Feb 23, 2026
var
D4PBCTenant: Record "D4P BC Tenant";
begin
D4PBCTenant.SetRange("Customer No.", "No.");
Copy link
Contributor

Choose a reason for hiding this comment

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

I would suggest to add confirm before - since if customer is moved to specific Partner Center it does not mean that existing Tenants are moved right away.

Copy link
Author

Choose a reason for hiding this comment

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

Why would you change Partner Center if the tenant is not moved, this is to locate where to find the customer connection, but I do see it as a failure check to make sure you don't move by a mistake :)

if D4PBCTenant.FindSet() then
repeat
D4PBCTenant.Validate("Partner Center Code", "Partner Center Code");
D4PBCTenant.Modify();
Copy link
Contributor

Choose a reason for hiding this comment

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

add (true)

field(24; "Partner Center Code"; Code[20])
{
Caption = 'Partner Center';
TableRelation = "D4P BC Partner Center".Code;
Copy link
Contributor

Choose a reason for hiding this comment

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

.Code is not needed if is primary key

Caption = 'Partner Center';
TableRelation = "D4P BC Partner Center".Code;
ToolTip = 'Unique code to identify the Partner Center';
ValidateTableRelation = true;
Copy link
Contributor

Choose a reason for hiding this comment

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

Default value - I would skip for clean code.

@@ -0,0 +1,27 @@
namespace D4P.CCMS.PartnerCenter;
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need a card for the Partner Centers? I think it is just a simple dictionary but might be wrong.

var
D4PBCCustomer: Record "D4P BC Customer";
begin
if "Customer No." <> '' then begin
Copy link
Contributor

Choose a reason for hiding this comment

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

I would add it on validate of Customer but maybe there are places that customer is not validated when created then make sense to have it here.

Copy link
Author

Choose a reason for hiding this comment

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

Customers are made before the tenants are imported, so if the Partner Center is added when the customer is created, the partner center isn't added on creation and should a customer get a second tenant, it can be added and the partner center will follow.

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.

Partner Center Mapping for D365 Customers & Tenants

4 participants