Hello,
I'm trying to create a new field in Email Item table. After adding the field to table I publish it and add it via Designer. After adding the field is greyed out.
What am I doing wrong?
AL Extension Version: 0.15.18771
Server Version: GB Dynamics NAV 12.0 (21229)
tableextension 50140 AddMailLookup extends "Email Item" //MyTargetTableId
{
fields
{
field(50140; To3; Text[200])
{
}
}
}
best regards,
Thomas Barbut
Could you try downloading the AL code created by the designer (Extension Management -> Download)? We can then see if there is anything missing in the generated code and if setting Enabled = true property on that page field fixes the problem.
Hello,
I went one stop further and tried to do it without the designer.
Still same result.
I have set all the needed properties.
Still the field is grey when I want to use it.
When I try against other table eg. Customer it works without any issues.
Maybe it's something related to Email Item table?
tableextension 50101 AddMailLookup extends "Email Item" //MyTargetTableId
{
fields
{
field(50101; To3; Text[200])
{
Caption = 'To3';
Enabled = true;
Editable = true;
FieldClass = Normal;
}
}
}
pageextension 50101 PageExtension50101 extends "Email Dialog"
{
layout
{
addafter(SendTo)
{
field(To3; To3)
{
ApplicationArea = All;
Visible = true;
HideValue = false;
Importance = Promoted;
Editable = true;
Enabled = true;
}
}
}
}
Hi @thomasbarbut,
The other fields on the Email Dialog page (To, Cc, Bcc, etc) are bound to global variables in their SourceExpression. In your page extension, you are binding To3 field to the record column To3 - that's the difference.
Apparently, Email dialog page does not insert a record when the page is open, therefore To3 field is disabled, but others are not.
To get the To3 field enabled, you could just follow the same pattern - declare a global variable To3Text, specify it as a source expression and then do something with the value when needed.
Hello @dennisfrostlander ,
I opened up Dynamics Development Enviroment and found that too the same day. Forgot to come back here and write about it.
Thanks alot.