How To define Option string Value of Option type field While creating New Table in Visual Studio Code using AL .
E.g Field Name "Type " Has Various Options "Placement,Sale, Purchase"
*This post is locked for comments
How To define Option string Value of Option type field While creating New Table in Visual Studio Code using AL .
E.g Field Name "Type " Has Various Options "Placement,Sale, Purchase"
*This post is locked for comments
Thanks
You Can define as below the field with option data type
field(1;type;Option)
{
OptionMembers=Quote,Order,Invoice,"Credit Memo","Payment Terms","General Journal","Sales Journal","Purchase Journal","Blanket Order";
OptionCaption='Quote,Order,Invoice,"Credit Memo","Payment Terms","General Journal","Sales Journal","Purchase Journal","Blanket Order"';
DataClassification = ToBeClassified;
}
Thanks For Response
I need syntax to define Option Field in table not for Option Parameter
Option declaration like this:
codeunit 50101 TestCodeunit { procedure HelloWithOptions(OptionParameter : Option A, B) var OptionVariable : Option C, "or D"; begin end; }
With help from people at the Microsoft/AL GitHub (https://github.com/Microsoft/AL/issues/2112).
This add-in for VS Code has been a big help too, https://github.com/CloudReadySoftware/crs-al-language-extension
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,280 Super User 2024 Season 2
Martin Dráb 230,235 Most Valuable Professional
nmaenpaa 101,156