modal-dsl / modal Goto Github PK
View Code? Open in Web Editor NEWA Domain Specific Language for AL Extension Development
License: Apache License 2.0
A Domain Specific Language for AL Extension Development
License: Apache License 2.0
Good morning, I tried to run the demo project and generate AL-objects from the seminar.management.mdal file. I used the latest BC version and installed JRE8 as mentioned.
But when I click to "Generate AL File" I get following error:
Exception in thread "Thread-0" com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 741562 path $
Attached the full Error Output
Error.txt
Can somebody help?
BR
Hello Jonathan,
First of all I must admit this project is impressive. I hope Microsoft will take some interest regarding your work because it can be an huge time saving for designing Business central.
I give it a try and it it's working like a charm
I've only a wonder, about model schema "Item->Document->Ledger". That is more like an enhancement tought than an issue :
I've created an "Investment" master table but I want to pass it through a journal instead of a document, in order to post ledger entries.
Allowing to set the ledger template without the document template, or add a simple "journal template" capability would be very great (althrough you already made the journal line table and codeunit for check and post) ๐
Regards
Is it mandatory to use all categories when creating a new solution. It seems so!
I get an error when I try this example:
solution "Seminar Management" {
Prefix = "SEM";
master "Seminar" {
ShortName = "Sem.";
fields {
template("Description"; Description)
field("Duration Days"; Decimal)
field("Minimum Participants"; Integer)
field("Maximum Participants"; Integer)
field("Language Code"; Code[10]) {
TableRelation = "Language";
}
field("Seminar Price"; Decimal)
field("Gen. Prod. Posting Group"; Code[20]) {
TableRelation = "Gen. Product Posting Group";
}
template("Dimensions"; Dimensions)
}
cardPage {
group("General") {
field("Description")
field("Duration Days")
field("Minimum Participants")
field("Maximum Participants")
field("Language Code")
}
group("Posting Details") {
field("Gen. Prod. Posting Group")
field("Seminar Price")
field("Dimensions")
}
}
listPage {
field("Description")
field("Duration Days")
field("Minimum Participants")
field("Maximum Participants")
field("Seminar Price")
field("Language Code")
}
}
}
When using a master like :
master "Real Estate Unit" {
ShortName = "REUnit";
This will generate a setup table definition with :
field(2; "RealEstateUnit Nos."; Code[20])
{
Caption = 'RealEstateUnit Nos.';
TableRelation = "No. Series";
But in the page definition you will get :
field("Real Estate Unit Nos."; "Real Estate Unit Nos.")
{
ApplicationArea = All;
}
When I would use short names for documents like this:
it gives me compile errors:
Full mdal:
solution "Name" {
Prefix = "PRE";
master "Container" {
ShortName = "Cont.";
fields {
template("Name"; Name)
template("Dimension"; Dimensions)
}
cardPage {
group("General") {
field("Name")
}
}
listPage {
field("Name")
}
}
document "Shipment" {
ShortName = "Ship";
header "Shipment Header" {
ShortName = "Ship Header";
StatusCaptions = ["Open", "Released"];
fields {
include("ContainerNo"; "Container"."No.")
}
}
line "Shipment Line" {
ShortName = "Ship Line";
fields {
field("Quantity"; Decimal)
}
listPartPage {
field("Quantity")
}
}
}
ledgerEntry "Container Ledger Entry" {
ShortName = "Cont. Ledger Entry";
fields {
include("ContainerNo"; "Container"."No.")
field("Quantity"; Decimal)
}
listPage {
field("Quantity")
}
}
}
With the NoImplicitWith
feature enabled in the app.json
file there are some "Implicit with" issues in generated pages and codeunits.
See: Referece
Hi Jonathan,
Great job, do you have further plans to add Flowfields to the model ?
Would it be an option to be able to define the srcgen -path. or always use the dir-structure.
So I would be able to create several mdal-files with different "Master" tables in one repo. eg. In your solution I would like to add a "Seminar School", which at his own turn have some suplementary tables (headmaster, ...). But I would like to use the automatic No. series possibility on this table.
So if I could create a directory structure in my repo like :
Seminar (top level)
seminar\seminar (master = seminar)
seminar\seminar\src (mdal file for seminar)
seminar\seminar\srcgen (generated source code for seminar)
seminar\school (master = school)
seminar\seminar\src (mdal file for school)
seminar\seminar\srcgen (generated source code for school)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.