AL icon indicating copy to clipboard operation
AL copied to clipboard

syntax for keys

Open RafaelKoch opened this issue 9 years ago • 3 comments

Can You please provide documentation and/or examples for the correct syntax for typical keys, including SumIndexFields and other options. Many thanks!

RafaelKoch avatar Apr 07 '17 12:04 RafaelKoch

Here is an example

table 71000018 MyTable 
{
    fields
    {
        field(1;Id;Code[10]) {}
        field(2;Amount;Decimal) {}
        field(3;"Amount (LCY)";Decimal) {}
    }
    Keys
    {
        Key(1;KeyName;Id,Amount){
            Clustered = true;
            SumIndexFields = Amount, "Amount (LCY)";
        }                    
    }               
} 

esbenk avatar Apr 07 '17 18:04 esbenk

Thanks for helping!

RafaelKoch avatar Apr 10 '17 11:04 RafaelKoch

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 04:06 hgnamvn