static void Job7(Args _args)
    {
        DictTable dictTable;
        Form form;
        FormBuildDesign design;
        FormBuildDataSource ds;
        FormBuildActionPaneControl actionPane;
        FormBuildActionPaneTabControl actionPaneTab;
        FormBuildButtonGroupControl btngrp1;
        FormBuildButtonGroupControl btngrp2;
        FormBuildCommandButtonControl cmdNew;
        FormBuildCommandButtonControl cmdDel;
        FormBuildMenuButtonControl mbPosting;
        FormBuildFunctionButtonControl mibPosting;
        FormBuildFunctionButtonControl mibForecast;
        FormBuildGridControl grid;
        FormBuildGroupControl grpBody;
        FormBuildTabPageControl tabPage;
        FormBuildTabControl tab;
        Args args;
        FormRun formRun;
        #Task
        dictTable = new DictTable(tableNum(CustGroup));

        //new form
        form = new Form();
        form.name("CustGroupDynamic1");

        //Add datasource
        ds = form.addDataSource(dictTable.name());
        ds.table(dictTable.id());

        // new design
        design = form.addDesign('Design');
        design.caption("Customer groups");
        design.style(FormStyle::SimpleList);
        design.titleDatasource(ds.id());

        //action pane
        actionPane = design.addControl(
        FormControlType::ActionPane, 'ActionPane');
        actionPane.style(ActionPaneStyle::Strip);
        actionPaneTab = actionPane.addControl(FormControlType::ActionPaneTab, 'ActionPaneTab');

        //Action group
        btngrp1 = actionPaneTab.addControl(FormControlType::ButtonGroup, 'NewDeleteGroup');
        btngrp2 = actionPaneTab.addControl(FormControlType::ButtonGroup, 'ButtonGroup');
        cmdNew = btngrp1.addControl(FormControlType::CommandButton, 'NewButton');
        cmdNew.buttonDisplay(FormButtonDisplay::TextAndImageLeft);
        cmdNew.normalImage('11045');
        cmdNew.imageLocation(SysImageLocation::EmbeddedResource);
        cmdNew.primary(NoYes::Yes);
        cmdNew.command(#taskNew);

        cmdDel = btngrp1.addControl(FormControlType::CommandButton, 'NewButton');
        cmdDel.text("Delete");
        cmdDel.buttonDisplay(FormButtonDisplay::TextAndImageLeft);
        cmdDel.normalImage('10121');
        cmdDel.imageLocation(SysImageLocation::EmbeddedResource);
        cmdDel.saveRecord(NoYes::Yes);
        cmdDel.primary(NoYes::Yes);
        cmdDel.command(#taskDeleteRecord);

        mbPosting = btngrp2.addControl(FormControlType::MenuButton, 'MenuButtonPosting');
        mbPosting.helpText("Set up related data for the group.");
        mbPosting.text("Setup");
        mbPosting.normalImage('10121');
        mbPosting.imageLocation(SysImageLocation::EmbeddedResource);

        mibPosting = mbPosting.addControl(FormControlType::MenuFunctionButton, 'Posting');
        mibPosting.text('Item posting');
        mibPosting.saveRecord(NoYes::No);
        mibPosting.dataSource(ds.id());
        mibPosting.normalImage('10121');
        mibPosting.imageLocation(SysImageLocation::EmbeddedResource);
        mibPosting.menuItemName(menuitemDisplayStr(InventPosting));
        mibForecast = btngrp2.addControl(FormControlType::MenuFunctionButton, 'SalesForecast');
        mibForecast.text('Forecast');
        mibForecast.saveRecord(NoYes::No);
        mibForecast.menuItemName(menuitemDisplayStr(ForecastSalesGroup));
        grpBody = design.addControl(FormControlType::Group, 'Body');
        grpBody.heightMode(FormHeight::ColumnHeight);
        grpBody.columnspace(0);
        grpBody.style(GroupStyle::BorderlessGridContainer);
        tab = grpBody.addControl(FormControlType::Tab,'Tab');
        tab.widthMode(FormWidth::ColumnWidth);
        tab.heightMode(FormHeight::ColumnHeight);
        tabPage = tab.addControl(FormControlType::TabPage,'Overview');
        tabPage.heightMode(FormHeight::ColumnHeight);
        tabPage.widthMode(FormWidth::ColumnWidth);
        tabPage.caption('Overview');
        grid = tabPage.addControl(FormControlType::Grid, "Grid");
        grid.dataSource(ds.name());
        grid.widthMode(FormWidth::ColumnWidth);
        grid.heightMode(FormHeight::ColumnHeight);
        grid.dataGroup('Overview');

        args = new Args();
        args.object(form);
        formRun = classFactory.formRunClass(args);
        formRun.init();
        formRun.run();
        formRun.detach();
    }