Rabu, 19 Oktober 2022

Membuat Class yang memanggil multiple MenuItem

1. Buat Class , contoh Class Testcallmultiplemenuitem
2. di declarasi class tambahkan variable.
    
        Args            args;

3. Buat method yang mereturn/hasilkan value Args

public Args parmArgs(Args _args = args)
{
    args = _args;

    return args;
}

4. Buat main method 

static void main(Args       _args)
{
    Testcallmultiplemenuitem            testcall = New Testcallmultiplemenuitem();
    testcall.parmArgs(_args);
    testcall.run();
}

5. Buat Menuitem action contoh TestPost, TestGeneratejournal
dengan label TestPost = "Post", TestGeneratejournal = "generate"

6. Buat method Run()

public void Run()
{
    //bisa menambahkan vairable yang dibutuhkan contoh.
    Testupdateheaderconfirm         updateheaderconfirm ;

    switch(this.parmArgs().menuItemName())
    {
        case "TestPost":
        if(args.record())
        updateheaderconfirm = this.parmArgs().record();
        idrekapmris = updateheaderconfirm.RekapID;
        this.ValidateSMRIS(idrekapmris);//Method yang menjalankan proses
        break;

        case "generate":
        if(args.record())
        updateheaderconfirm = this.parmArgs().record();
        idrekapmris = updateheaderconfirm.RekapID;
        this.FindJournalAdjusment(idrekapmris);
        break;
       
    }

}





}



Jumat, 14 Oktober 2022

Error Posting Jurnal AP Transaction have been selected for settlement, although settlement type:none was selected for vendor [], voucher []

https://ax2012infolog.wordpress.com/2017/07/24/apjournalpayment-journal-it-unable-to-post-or-non-post-journal-have-a-message-appears-transactions-have-been-selected-for-settlement-although-settlement-type-none-was-selected-for-vendor/comment-page-1/?unapproved=13&moderation-hash=d8cd36e7fc52be482ded2c8773262ca8#comment-13

Erorr CS1963 - An expression tree may not contain a dynamic operation.

Kali ini saya mendapatkan erorr dengan code CS1963, padahal sebelumnya saya sudah mendefinisikan 'var item in Model' di @foreach(var...