microsoft / ALAppExtensions

Repository for collaboration on Microsoft AL application add-on and localization extensions for Microsoft Dynamics 365 Business Central.
MIT License
792 stars 622 forks source link

[Bug]:Wrong ExternalName in CRM Table: "FS Work Order" #27447

Open JDEnergieversum opened 1 month ago

JDEnergieversum commented 1 month ago

Describe the issue

Pretty straight forward. Whenever you want to use CDS Table: "FS Work Order". Doesn't matter which on you use (The Obsolete one, or the Field Service Integration one). Both WON'T work.

msdyn_workorder' entity doesn't contain attribute with Name = 'msdyn_workorderId' and NameMapping = 'Logical'. MetadataCacheDetails: ProviderType=Dynamic, StandardCache=True, IsLoadedInStagedContext = False, Timestamp=1236622815, MinActiveRowVersion=1236622815, MetadataInstanceId=26445418, LastUpdated=2024-10-17 10:47:54.560, OrgId=ab3719dd-6e1e-465e-9f25-8f7e7b05f8bf Page Arbeitsaufträge has to close.

Is the error you receive, when trying to display the data on a page.

The Primary Key / Unique Identifier has the wrong ExternalName.

It's field(1; WorkOrderId; GUID) { ExternalName = 'msdyn_workorderId'; ExternalType = 'Uniqueidentifier'; ExternalAccess = Insert; Description = 'Shows the entity instances.'; Caption = 'WO Number'; DataClassification = SystemMetadata; }

but should be field(1; WorkOrderId; GUID) { ExternalName = **_'msdyn_workorderid; ExternalType = 'Uniqueidentifier'; ExternalAccess = Insert; Description = 'Shows the entity instances.'; Caption = 'WO Number'; DataClassification = SystemMetadata; }

The fix we are using is creating a own CDS Table from Scratch. But it would be really nice, if you could fix this.

Expected behavior

Being able to retrieve Data from the Integration Table and display it on a page

Steps to reproduce

Create a new Page for Table "FS Work Order" of your choice. Display the field of your choice (as example "Name").

Add the following code.

trigger OnInit()
var
begin
    Codeunit.Run(Codeunit::"CRM Integration Management");
end;

And try to open the page.

Additional context

You need to setup the Dataverse Connection first.

I will provide a fix for a bug

JesperSchulz commented 3 weeks ago

Sounds fair. Approved. Please create a PR to address the issue.

JesperSchulz commented 5 days ago

We now have a support case for this and this issue will hence get picked up by the product group.