AL icon indicating copy to clipboard operation
AL copied to clipboard

[Question] Add more key into native table

Open hgnamvn opened this issue 9 years ago • 4 comments

[Question] Please help me. I'm a new developer for Extension 2.0. Example: 1. Add more file Offset Type into Table 17 G/L Entry. -> It is OK. 2. I need add more key: keys { key(Key9;"Transaction No.","Document No.","Offset Type") { } } But It isn't OK. So how to do it. OR this isn't supported. From the help link. "You can add table keys, but you cannot delete or modify existing keys".

hgnamvn avatar Jun 27 '17 05:06 hgnamvn

Currently this is not supported. In V1 the original table was modified when adding a field. In V2 new fields are in a companion table.

We investigating ways to support key in tableextensions that includes fields from the base-table. We don't have a timeline for that.

esbenk avatar Jun 27 '17 07:06 esbenk

Hi Esbenk,

Thank for your reply quickly! I hope extension can support it in the future.

hgnamvn avatar Jun 27 '17 08:06 hgnamvn

@esbenk Related to the so-called 'companion' tables. I guess these tables are the ones referred to in the below screenshot (where I've published 2 extensions, extending the 'Customer' table), named with the Source table followed by the id of my extension?

image

But once I uninstall and unpublish all my extensions, should these companion tables be deleted as well (which is not the case), or do these tables act as the 'archive' tables to eventually restore the appdata??

Cfr. previous naming of appdata archive tables...

image

fvet avatar Jul 03 '17 19:07 fvet

Yes, that is the companion tables. In extensions V1 the data was preserved in $AppData$* tables after uninstall, but with the separate companion tables that is not needed.

esbenk avatar Jul 04 '17 07:07 esbenk