microsoft / AL

Home of the Dynamics 365 Business Central AL Language extension for Visual Studio Code. Used to track issues regarding the latest version of the AL compiler and developer tools available in the Visual Studio Code Marketplace or as part of the AL Developer Preview builds for Dynamics 365 Business Central.
MIT License
719 stars 242 forks source link

Unable to import into child tables correctly #7702

Closed ncunningham9 closed 3 months ago

ncunningham9 commented 3 months ago

1. Describe the bug Using the D365BC Connector inside Power Automate, users are unable to import into a "child" table while referencing the "parent" table, because the parent table name is a primary key inside the child table. Primary Keys cannot be imported into, but that is a requirement for basic functionality of child tables.

2. To Reproduce Steps to reproduce the behavior:

  1. Create a custom API for a "child" table. Examples: Price List Lines, Production BOM Lines, or Routing Lines.
  2. Go to Power Automate
  3. Create a Flow using the D365BC Connector
  4. Select "Create a Record"
  5. Click Advanced Parameters and scroll through the list of available fields.
AL Code: 
![price list AL](https://github.com/microsoft/AL/assets/108375368/839da567-ccbf-49e8-b732-2c6031bf7bf3)

Power Automate: 
![power automate code](https://github.com/microsoft/AL/assets/108375368/45d2f198-2009-4321-ba61-c15ff8c3ff81)

D365 Instance: 
![price list code missing](https://github.com/microsoft/AL/assets/108375368/c577bcb5-a844-46d0-b739-606666309861)

Note: Because the developers need to copy and paste the code snippet, including a code snippet as a media file (i.e. .gif) is not sufficient. --> I was instructed to submit an issue in this repository by Microsoft Support (David Oyebode). This issue is less of an issue of AL Code and more an issue of the D365 Connector, which I don't have the code for. If there's another GitHub repository to state this issue, please advise.

3. Expected behavior

  1. Create a custom API for a child table.
  2. Power Automate Flows would allow a primary key through the Advanced Parameters menu (or, at least one main primary key in order to associate it with a parent record),
  3. If the Primary Key is not imported into correctly, the flow would fail with an error message something like "Unknown Parent Record"

4. Actual behavior

  1. Create a custom API for a child table
  2. Power Automate, connect to API
  3. Primary Key fields unavailable in advanced parameters menu
  4. Power Automate successfully imports into a child table, with no relationship to a parent table.

5. Versions:

Final Checklist

Please remember to do the following:

thloke commented 3 months ago

Hi,

Unfortunately CSS was wrong in this case. We cannot handle this issue through this repository since it is not an issue with the AL language or the compiler. I've raised the issue of CSS wrongly referring to this repository internally so it doesn't happen again.

For this issue, it needs to go to the team that handles the Power Automate connector. Usually the correct way for this to happen is either through an IcM if it's time sensitive and impacting production, or a RFH (request for hotfix) if it's behaviour that needs to be patched. CSS should be able to help you with either of this.

Sorry again that we can't help you through this channel even though you were referred here.

Thanks, Thaddeus