Conversation
| var | ||
| D4PBCTenant: Record "D4P BC Tenant"; | ||
| begin | ||
| D4PBCTenant.SetRange("Customer No.", "No."); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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(); |
| field(24; "Partner Center Code"; Code[20]) | ||
| { | ||
| Caption = 'Partner Center'; | ||
| TableRelation = "D4P BC Partner Center".Code; |
There was a problem hiding this comment.
.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; |
There was a problem hiding this comment.
Default value - I would skip for clean code.
| @@ -0,0 +1,27 @@ | |||
| namespace D4P.CCMS.PartnerCenter; | |||
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Fixes #125
In case customers are spread over more Partner centers this is adding the possibility to map a customer to a Partner Center.