Alfasith AX

Alfasith AX
اللَّهُمَّ انْفَعْنِي بِمَا عَلَّمْتَنِي، وَعَلِّمْنِي مَا يَنْفَعُنِي، وَزِدْنِي عِلْمًا

Sunday, October 8, 2017

Checkbox in dialog in X++

static void DialogCheckBox(Args _args)
{
    Dialog      dialog                   = new Dialog("New dialog with checkBox");
    NoYesId     checkValue               = NoYes::No;
    str                         strMessage = "Confirmation will create Variation. \n Click OK to proceed.";
    str                         strTitle = "Confirmation of Project / Contract WBS";

    DialogField dialogFieldVariation     = dialog.addFieldValue(extendedTypeStr(NoYesId), checkValue, "Create variation");
    DialogField dialogFieldVariationType = dialog.addFieldValue(enumStr(ProjBudgetRevRequestorType), "","Variation type");
    DialogField dialogFieldVariationDiscription = dialog.addFieldValue(extendedTypeStr(Description), "" );
    dialog.caption("Confirmation of Project / Contract WBS");
    dialog.addText("Please check to create Variation. Click OK to proceed",0);
    if (dialog.run())
    {
        checkValue = dialogFieldVariation.value();
        if(checkValue)
            info("Hi");
        else
            info("Bye");
    }
}

No comments:

Post a Comment

How find size of recordsortedlist in D365/AX 2012

Hi, This is the continuity of the previous article where we are now getting the size of recordsortedlist . if(recordsortedlist.len() >1) ...