Git Product home page Git Product logo

modal's Issues

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 $

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

Journal template instead of Document to create ledgers

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

Should I use all Categories (e. g. Master, Supplemental, (Posted) Document Header, (Posted) Document Line, Setup).

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")
        }
    }
}

Using spaces in Master-Name generates problems in setup page

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;
}

Short names

When I would use short names for documents like this:
image
it gives me compile errors:
image
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")
        }
    }
    
    
}

CodeCop warnings

I see that the models don't take the implicit and explicit withs into account:

image

Use of Flowfields

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.